Here's another one that prints directly to the console:
current-directory get .
/
IN: scratchpad rake try-output-process
Process:
T{ process
{ command rake }
{ environment H{ } }
{ environment-mode +append-environment+ }
{ stdin +closed+ }
{ stdout T{ fd { disposed t } { fd 37
Hi, group
I had a need to run rake command from a TextEditor ( DevonTHINK) by using the
factor service.
I tried to use:
: set-rake-pathname ( dir -- str )
rubymotion-projects-path swap / glue ;
: run-terminal ( str -- )
Terminal.app ascii [
%s printf
]
The Factor launcher is for directly running processes.
1) You can run your rake command directly:
{ rake RubyMotionSamples/ios/Timer } try-process
2) Or if you want to run it in your Terminal.app, then maybe a bit of
applescript:
USE: cocoa.apple-script
RubyMotionSamples/ios/Timer
Thanks.
John Benediktsson 於 2014/12/23 下午11:45 寫道:
The Factor launcher is for directly running processes.
1) You can run your rake command directly:
{ rake RubyMotionSamples/ios/Timer } try-process
I need to change directory first and rake.
{ cd
Hey,
You don't need to call ``cd`` manually, you can use a combinator for this:
/Users [ ls try-process ] with-directory
same as
/Users [ { ls } try-process ] with-directory
OSX has problems with the PATH variable when run from the launcher. You can
see what your path is by doing:
PATH os-env