File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ let package = Package(
3232 ) ,
3333 . binaryTarget(
3434 name: " run-script-bin " ,
35- url: " https://github.com/p-x9/RunScriptPlugin/releases/download/0.1 .0/run-script-bin.artifactbundle.zip " ,
36- checksum: " d5e984321b277ca3228f2d1d2e4eb0f84f6ff53e05d0516a0640838aa60e32c5 "
35+ url: " https://github.com/p-x9/RunScriptPlugin/releases/download/0.3 .0/run-script-bin.artifactbundle.zip " ,
36+ checksum: " 3e43154c72e5d7bdadbe000cd23f78cbcf8f200149ea28a969539c22ef7be524 "
3737 ) ,
3838// DEBUG
3939// .binaryTarget(name: "run-script-bin", path: "./run-script-bin.artifactbundle.zip"),
Original file line number Diff line number Diff line change @@ -85,8 +85,10 @@ extension RunScript {
8585extension RunScript {
8686 func run( _ script: Script ) throws {
8787 let process = Process ( )
88+ let errorPipe = Pipe ( )
8889
8990 process. launchPath = script. launchPath ?? " /bin/sh "
91+ process. standardError = errorPipe
9092
9193 if let path = script. path {
9294 process. arguments = [ path]
@@ -96,8 +98,12 @@ extension RunScript {
9698 process. arguments = [ " -c " , script]
9799 }
98100
99- process. launch ( )
100- process. waitUntilExit ( )
101+ try process. run ( )
102+
103+ let errorData = errorPipe. fileHandleForReading. readDataToEndOfFile ( )
104+ if let error = String ( data: errorData, encoding: . utf8) {
105+ log ( " warning: [RunScriptPlugin] " + error)
106+ }
101107 }
102108}
103109
You can’t perform that action at this time.
0 commit comments