From eff36d83ec9bac3aede81a5d5e83feae082de2c8 Mon Sep 17 00:00:00 2001 From: Kare Morstol Date: Thu, 31 Mar 2016 21:43:33 +0200 Subject: [PATCH] =?UTF-8?q?Docs:=20add=20warning=20about=20crashing=20if?= =?UTF-8?q?=20=E2=80=98executable=E2=80=99=20is=20not.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Executable that is. --- Sources/SwiftShell/Command.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SwiftShell/Command.swift b/Sources/SwiftShell/Command.swift index 9228be7..17ff8a5 100644 --- a/Sources/SwiftShell/Command.swift +++ b/Sources/SwiftShell/Command.swift @@ -189,6 +189,7 @@ extension ShellRunnable { /** Shortcut for shell command, returns output and errors as a String. + - warning: will crash if ‘executable’ could not be launched. - parameter executable: path to an executable file. - parameter args: the arguments, one string for each. - returns: standard output and standard error in one string, trimmed of whitespace and newline if it is single-line. @@ -249,6 +250,7 @@ extension ShellRunnable { /** Run executable and return before it is finished. + - warning: will crash if ‘executable’ could not be launched. - parameter executable: Path to an executable file. If not then exit. - parameter args: Arguments to the executable. - returns: An AsyncShellTask with standard output, standard error and a 'finish' function. @@ -287,6 +289,7 @@ extension ShellRunnable { /** Shortcut for shell command, returns output and errors as a String. +- warning: will crash if ‘executable’ could not be launched. - parameter executable: path to an executable file. - parameter args: the arguments, one string for each. - returns: standard output and standard error in one string, trimmed of whitespace and newline if it is single-line. @@ -298,6 +301,7 @@ public func run (executable: String, _ args: Any ..., file: String = #file, line /** Run executable and return before it is finished. +- warning: will crash if ‘executable’ could not be launched. - parameter executable: path to an executable file. - parameter args: arguments to the executable. - returns: an AsyncShellTask with standard output, standard error and a 'finish' function.