Search code examples
smalltalkpharo

How to install OSProcess in Pharo?


I want to use OSProcess to execute external programs in Linux and MacOS from Pharo 1.4. I've followed other post install instructions but when I evaluate

(PipeableOSProcess command: 'pwd') output asFileReference

it hangs the VM under Ubuntu. For OSProcessPlugin There is a Squeak wiki page with instructions but execution returns:

OSProcess not available or OSProcess plugin not functioning

Loading OSProcess sar file from the File Browser leads to a Syntax Error

(anArrayOfNullTerminatedStrings collect: [:e | e size])
    inject: offset into: [:p :e | ws nextPut: p. Cannot store into -> p := p + e].

Do I have to build my own VM to make it work? What do I need to do to execute commands in Linux under latest Pharo 1.4?


Solution

  • From the Pharo book (read it!)

    Gofer new
        squeaksource3: 'coral';
        package: 'OSProcess'; 
        load.