CommandShell - linux - missing directory in path
Hi all, as far as I know, NativeBoost does not yet allow starting external programs on linux, so I'm trying to use CommandShell. CommandShell new open; command: 'ls -l' . And I get an error: DirectoryDoesNotExist: Path / 'usr' / 'local' / 'sbin' I must admit, that this directory is in $PATH, but is not available on disk. Is there a deeper reason to signal an error in this case, or should this be treated as a bug? (Pharo 2.0) Kind regards, Ingo
I can't properly answer your question, and in typical forum behavior I suggest using a different approach :) (PipeableOSProcess command: 'ls -l') output On 2013-04-26, at 10:12, Ingo Hohmann <pharo@ingohohmann.de> wrote:
Hi all,
as far as I know, NativeBoost does not yet allow starting external programs on linux, so I'm trying to use CommandShell.
CommandShell new open; command: 'ls -l' .
And I get an error:
DirectoryDoesNotExist: Path / 'usr' / 'local' / 'sbin'
I must admit, that this directory is in $PATH, but is not available on disk.
Is there a deeper reason to signal an error in this case, or should this be treated as a bug?
(Pharo 2.0)
Kind regards,
Ingo
Hi. When I worked a bit with OSProcess I remember I had to set $PATH, but this was on OSX: "Setup OS Process" env := OSProcess thisOSProcess environment copy. path := (env at: #PATH), ':/usr/local/bin/:/usr/bin/'. env at: #PATH put: path. Maybe you can try it... Best, On Fri, Apr 26, 2013 at 6:30 AM, Camillo Bruni <camillobruni@gmail.com>wrote:
I can't properly answer your question, and in typical forum behavior I suggest using a different approach :)
(PipeableOSProcess command: 'ls -l') output
On 2013-04-26, at 10:12, Ingo Hohmann <pharo@ingohohmann.de> wrote:
Hi all,
as far as I know, NativeBoost does not yet allow starting external programs on linux, so I'm trying to use CommandShell.
CommandShell new open; command: 'ls -l' .
And I get an error:
DirectoryDoesNotExist: Path / 'usr' / 'local' / 'sbin'
I must admit, that this directory is in $PATH, but is not available on disk.
Is there a deeper reason to signal an error in this case, or should this be treated as a bug?
(Pharo 2.0)
Kind regards,
Ingo
-- Mariano http://marianopeck.wordpress.com
Hi Mariano, actually the $PATH is correctly taken from my system settings, it's broken in the system settings. The idea from Camillo works, as well as changing the $PATH on the system. The remaining question is: should this be reported as a bug? (I tend to yes) Thank you, Ingo On 04/26/2013 02:44 PM, Mariano Martinez Peck wrote:
Hi. When I worked a bit with OSProcess I remember I had to set $PATH, but this was on OSX:
"Setup OS Process" env := OSProcess thisOSProcess environment copy. path := (env at: #PATH), ':/usr/local/bin/:/usr/bin/'. env at: #PATH put: path.
Maybe you can try it...
Best,
On Fri, Apr 26, 2013 at 6:30 AM, Camillo Bruni <camillobruni@gmail.com <mailto:camillobruni@gmail.com>> wrote:
I can't properly answer your question, and in typical forum behavior I suggest using a different approach :)
(PipeableOSProcess command: 'ls -l') output
On 2013-04-26, at 10:12, Ingo Hohmann <pharo@ingohohmann.de <mailto:pharo@ingohohmann.de>> wrote: > Hi all, > > as far as I know, NativeBoost does not yet allow starting external > programs on linux, so I'm trying to use CommandShell. > > CommandShell new open; command: 'ls -l' . > > And I get an error: > > DirectoryDoesNotExist: Path / 'usr' / 'local' / 'sbin' > > > I must admit, that this directory is in $PATH, but is not available on > disk. > > Is there a deeper reason to signal an error in this case, or should this > be treated as a bug? > > (Pharo 2.0) > > Kind regards, > > Ingo >
-- Mariano http://marianopeck.wordpress.com
On 26 April 2013 16:11, Ingo Hohmann <pharo@ingohohmann.de> wrote:
Hi Mariano,
actually the $PATH is correctly taken from my system settings, it's broken in the system settings.
The idea from Camillo works, as well as changing the $PATH on the system.
The remaining question is: should this be reported as a bug? (I tend to yes)
bug or feature? it helped you to detect that your PATH variable contains non-existent directory.. :) and while OS shell is quite forgiving, i'm not sure if things we're using in Pharo should be also forgiving as well... so, i don't have strong opinion on it.. but maybe you right, and CommandShell should behave similar to OS shell (in respect that in cases if OS shell don't barks, neither CommandShell should).
Thank you,
Ingo
-- Best regards, Igor Stasenko.
Igor Stasenko wrote:
On 26 April 2013 16:11, Ingo Hohmann <pharo@ingohohmann.de> wrote:
Hi Mariano,
actually the $PATH is correctly taken from my system settings, it's broken in the system settings.
The idea from Camillo works, as well as changing the $PATH on the system.
The remaining question is: should this be reported as a bug? (I tend to yes)
so, i don't have strong opinion on it.. but maybe you right, and CommandShell should behave similar to OS shell (in respect that in cases if OS shell don't barks, neither CommandShell should).
It should not deviate unnecessarily from existing conventions. Its not always good to make it "better" if that conflicts with Principle Of Least Surprise. A corollary is the McDonalds Burger Principle, its not the best burger in the world, but it is the same in every store in the world --> success. cheers -ben
Thank you,
Ingo
Ben Coman wrote
the McDonalds Burger Principle
I think you meant "70+ year marketing campaign targeted at small children" -> success. But we get the point ;) ----- Cheers, Sean -- View this message in context: http://forum.world.st/CommandShell-linux-missing-directory-in-path-tp4683666... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (6)
-
Ben Coman -
Camillo Bruni -
Igor Stasenko -
Ingo Hohmann -
Mariano Martinez Peck -
Sean P. DeNigris