mas/Sources/MasKit/ExternalCommands/OpenSystemCommand.swift

25 lines
497 B
Swift
Raw Normal View History

2019-01-03 15:15:53 -08:00
//
2019-01-03 17:15:50 -08:00
// OpenSystemCommand.swift
2019-01-03 15:15:53 -08:00
// MasKit
//
// Created by Ben Chatelain on 1/2/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
2019-01-03 15:15:53 -08:00
/// Wrapper for the external open system command.
/// https://ss64.com/osx/open.html
struct OpenSystemCommand: ExternalCommand {
var binaryPath: String
2019-01-03 15:15:53 -08:00
let process = Process()
2019-01-03 15:15:53 -08:00
let stdoutPipe = Pipe()
let stderrPipe = Pipe()
2019-01-03 15:15:53 -08:00
init(binaryPath: String = "/usr/bin/open") {
2019-01-03 15:15:53 -08:00
self.binaryPath = binaryPath
}
}