This repository was archived by the owner on Dec 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ ROOTDIR="$DIR/.."
2424# determine which argv to ignore
2525export DEVMODE=true
2626
27- exec " $ROOTDIR /node_modules/.bin/electron" " $ROOTDIR " --fsh-headless $@
27+ exec " $ROOTDIR /node_modules/.bin/electron" " $ROOTDIR " --fsh-headless " $@ "
Original file line number Diff line number Diff line change @@ -636,7 +636,7 @@ const main = (app, mainFunctions) => {
636636 //
637637 // execute a single command from the CLI
638638 //
639- const cmd = argv . join ( ' ' ) . trim ( )
639+ const cmd = argv . map ( _ => _ . match ( / \s + / ) ? `" ${ _ } "` : _ ) . join ( ' ' ) . trim ( )
640640 if ( cmd && cmd . length > 0 ) {
641641 debug ( 'about to execute command' )
642642 return Promise . resolve ( ) . then ( ( ) => eval ( cmd ) ) . catch ( maybeRetry )
Original file line number Diff line number Diff line change @@ -133,4 +133,13 @@ describe('Headless mode', function() {
133133 it ( 'should create an action with an env var parameter' , ( ) => cli . do ( 'action create envfun ./data/echo.js -p fun $FUN' , { FUN : 3 } )
134134 . then ( cli . expectOK ( 'ok: updated action envfun\n' , { exact : true } ) )
135135 . catch ( common . oops ( this ) ) )
136+
137+ it ( 'should create an action with params-with-spaces' , ( ) => cli . do ( 'action create spacey ./data/echo.js -p fun "space cadet"' )
138+ . then ( cli . expectOK ( 'ok: updated action spacey\n' , { exact : true } ) )
139+ . catch ( common . oops ( this ) ) )
140+
141+ it ( 'should invoke spacey' , ( ) => cli . do ( 'action invoke spacey' )
142+ . then ( cli . expectOK ( 'fun: "space cadet"' ) )
143+ . catch ( common . oops ( this ) ) )
144+
136145} )
You can’t perform that action at this time.
0 commit comments