UnixOperatingSystem.st
changeset 20460 4831c0d89182
parent 20456 b87283a19b7f
child 20578 39641ba8d6e0
child 20609 1b423e40ed09
--- 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.