--- a/UnixOperatingSystem.st Fri Jan 27 15:53:05 2006 +0100
+++ b/UnixOperatingSystem.st Mon Jan 30 18:14:32 2006 +0100
@@ -3317,31 +3317,36 @@
return its full pathName if there is such a command, otherwise
return nil."
- |path f fExt|
-
- aCommand asFilename isAbsolute ifTrue:[
- ^ aCommand
+ |path f fExt commandFilename|
+
+ commandFilename := aCommand asFilename.
+
+ commandFilename isAbsolute ifTrue:[
+ ^ aCommand
+ ].
+ commandFilename isExplicitRelative ifTrue:[
+ ^ commandFilename pathName
].
path := self getEnvironment:'PATH'.
path notNil ifTrue:[
- (path asCollectionOfSubstringsSeparatedBy:(self pathSeparator)) do:[:path |
- path isEmpty ifTrue:[
- f := aCommand asFilename
- ] ifFalse:[
- f := path asFilename construct:aCommand.
- ].
- self executableFileExtensions do:[:ext |
- ext notEmpty ifTrue:[
- fExt := (f pathName , ext) asFilename.
- ] ifFalse:[
- fExt := f.
- ].
- fExt isExecutable ifTrue:[
- ^ fExt pathName
- ].
- ].
- ].
+ (path asCollectionOfSubstringsSeparatedBy:(self pathSeparator)) do:[:path |
+ path isEmpty ifTrue:[
+ f := aCommand asFilename
+ ] ifFalse:[
+ f := path asFilename construct:aCommand.
+ ].
+ self executableFileExtensions do:[:ext |
+ ext notEmpty ifTrue:[
+ fExt := (f pathName , ext) asFilename.
+ ] ifFalse:[
+ fExt := f.
+ ].
+ fExt isExecutable ifTrue:[
+ ^ fExt pathName
+ ].
+ ].
+ ].
].
^ nil
@@ -3351,6 +3356,7 @@
OperatingSystem pathOfCommand:'ls'
OperatingSystem pathOfCommand:'cvs'
OperatingSystem pathOfCommand:'stx'
+ OperatingSystem pathOfCommand:'./stx'
"
"windows:
@@ -12495,7 +12501,7 @@
!UnixOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.235 2005-11-23 13:48:23 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/UnixOperatingSystem.st,v 1.236 2006-01-30 17:14:32 stefan Exp $'
! !
UnixOperatingSystem initialize!