Skip to content

Instantly share code, notes, and snippets.


Gabriel N. gary17

View GitHub Profile
View shell-run.swift
import Foundation
enum /* namespace */ Shell {
static func run(command: String, arguments: [String] = []) throws -> (stdout: String?, stderr: String?) {
let process = Process()
process.executableURL = URL(fileURLWithPath: command)
process.arguments = arguments
let pipes = (stdout: Pipe(), stderr: Pipe())
You can’t perform that action at this time.