Skip to content

Commit bd982ea

Browse files
committed
Issue #58: improve noError logic for shell commands [ci skip]
1 parent be5e821 commit bd982ea

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

Diff for: repository/GsDevKit-CommandLine.package/GsDevKitAbstractCommandLineHandler.class/class/runShellCommand.args.noError..st

+17-16
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,23 @@ runShellCommand: shellCommandPath args: shellArgumentArray noError: noError
2020
FileStream readOnlyFileNamed: errName do: [ :fileStream | stdErr := fileStream contents ].
2121
success
2222
ifFalse: [
23-
Transcript
24-
cr;
25-
show: 'Error running shell command: ' , shellCommandPath printString;
26-
cr;
27-
show: 'with args:'.
28-
shellArgumentArray
29-
do: [ :arg |
23+
noError
24+
ifFalse: [
3025
Transcript
3126
cr;
32-
tab;
33-
show: arg ].
34-
Transcript
35-
cr;
36-
show: 'STDOUT: ' , stdOut printString;
37-
cr;
38-
show: 'STDERR: ' , stdErr.
39-
noError
40-
ifFalse: [ self error: 'Shell command: ' , shellCommandPath printString , ' failed.' ] ].
27+
show: 'Error running shell command: ' , shellCommandPath printString;
28+
cr;
29+
show: 'with args:'.
30+
shellArgumentArray
31+
do: [ :arg |
32+
Transcript
33+
cr;
34+
tab;
35+
show: arg ].
36+
Transcript
37+
cr;
38+
show: 'STDOUT: ' , stdOut printString;
39+
cr;
40+
show: 'STDERR: ' , stdErr.
41+
self error: 'Shell command: ' , shellCommandPath printString , ' failed.' ] ].
4142
^ stdOut

Diff for: repository/GsDevKit-CommandLine.package/GsDevKitAbstractCommandLineHandler.class/methodProperties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" : {
33
"isAbstract" : "dkh 7/19/2014 07:48",
44
"runShellCommand:args:" : "dkh 3/20/2015 12:07",
5-
"runShellCommand:args:noError:" : "dkh 3/20/2015 12:07" },
5+
"runShellCommand:args:noError:" : "dkh 3/20/2015 13:09" },
66
"instance" : {
77
"backupsHome" : "dkh 7/19/2014 17:46",
88
"binHome" : "dkh 7/30/2014 15:34",

0 commit comments

Comments
 (0)