--- a/UnixOperatingSystem.st Tue Sep 27 15:05:45 2016 +0200
+++ b/UnixOperatingSystem.st Tue Sep 27 15:09:44 2016 +0200
@@ -3814,15 +3814,20 @@
commandFilename := aCommand asFilename.
commandFilename isAbsolute ifTrue:[
"/ something like "/foo/...", tried path is it
- ^ commandFilename pathName isExecutable
+ commandFilename isExecutable ifFalse:[^ nil].
+ ^ commandFilename pathName
].
commandFilename isExplicitRelative ifTrue:[
"/ something like "../foo/...", tried path resolved relative to the current directory
- ^ commandFilename pathName isExecutable
+ commandFilename isExecutable ifFalse:[^ nil].
+ ^ commandFilename pathName
].
(aCommand includes:$/) ifTrue:[
"/ something like "smalltalk/stx", tried path is relative to the current directory
- ^ ('./',aCommand) asFilename pathName isExecutable
+ (f := ('./',aCommand) asFilename) isExecutable ifTrue:[
+ ^ f pathName
+ ].
+ ^ nil
].
"/ command is a single word, not relative and not absolute.