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/.."
24
24
# determine which argv to ignore
25
25
export DEVMODE=true
26
26
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) => {
636
636
//
637
637
// execute a single command from the CLI
638
638
//
639
- const cmd = argv . join ( ' ' ) . trim ( )
639
+ const cmd = argv . map ( _ => _ . match ( / \s + / ) ? `" ${ _ } "` : _ ) . join ( ' ' ) . trim ( )
640
640
if ( cmd && cmd . length > 0 ) {
641
641
debug ( 'about to execute command' )
642
642
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() {
133
133
it ( 'should create an action with an env var parameter' , ( ) => cli . do ( 'action create envfun ./data/echo.js -p fun $FUN' , { FUN : 3 } )
134
134
. then ( cli . expectOK ( 'ok: updated action envfun\n' , { exact : true } ) )
135
135
. 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
+
136
145
} )
You can’t perform that action at this time.
0 commit comments