#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Tue, 27 Sep 2016 14:56:57 +0200
changeset 20455 893fe6053faf
parent 20454 4b44463a3054
child 20456 b87283a19b7f
#DOCUMENTATION by cg class: UnixOperatingSystem comment/format in: #pathOfCommand:
UnixOperatingSystem.st
--- a/UnixOperatingSystem.st	Tue Sep 27 14:54:20 2016 +0200
+++ b/UnixOperatingSystem.st	Tue Sep 27 14:56:57 2016 +0200
@@ -3815,16 +3815,20 @@
 
     commandFilename := aCommand asFilename.
     commandFilename isAbsolute ifTrue:[
+        "/ something like "/foo/...", tried path is it
         ^ commandFilename pathName
     ].
     commandFilename isExplicitRelative ifTrue:[
+        "/ something like "../foo/...", tried path resolved relative to the current directory
          ^ commandFilename pathName
     ].
     (aCommand includes:$/) ifTrue:[
-        "/ something like "smalltalk/stx", if executed from a parent directory
+        "/ something like "smalltalk/stx", tried path is relative to the current directory
         ^ ('./',aCommand) asFilename pathName
     ].
 
+    "/ command is a single word, not relative and not absolute.
+    "/ search along PATH environment variable to see what a shoell would do.
     path := self getEnvironment:'PATH'.
     path notEmptyOrNil ifTrue:[
         (path asCollectionOfSubstringsSeparatedBy:self pathSeparator) do:[:eachPathComponent |