OSProcess execution from specific directory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OSProcess execution from specific directory

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: OSProcess execution from specific directory

David T. Lewis
On Mon, Aug 05, 2013 at 08:42:12AM -0400, Juraj Kubelka wrote:

> Hi!
>
> On execution of
>
> (PipeableOSProcess command: 'pwd') output
>
> , it always says root directory ("/"). Is it possible to execute command from specific directory? Or the only correct solution is like this?:
>
> (PipeableOSProcess command: 'cd /Users/jura/ ; pwd') output
>
> Thanks a lot.
> Cheers,
> Jura

By default, PipeableOSProcess class>command: uses whatever current working
directory is being used by the VM (which may vary depending on how your
VM and image are being run). You can specify a different working directory
like this:

  (PipeableOSProcess command: 'pwd'
        environment: nil
        workingDir: '/usr/bin'
        input: nil
        output: nil
        error: nil
        errorPipelineStream: nil) output

HTH,
Dave


Reply | Threaded
Open this post in threaded view
|

Re: OSProcess execution from specific directory

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.