File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ describe('cds compiler command', () => {
62
62
if ( fullCommand === '-c cds --version' ) {
63
63
throw new Error ( 'Command not found' ) ;
64
64
}
65
- if ( fullCommand === '-c npx -y --package @sap/cds-dk cds --version' ) {
65
+ // The shell-quote library escapes the command, so it becomes quoted
66
+ if ( fullCommand === "-c 'npx -y --package @sap/cds-dk cds' --version" ) {
66
67
return Buffer . from ( '6.1.3' ) ;
67
68
}
68
69
throw new Error ( 'Unexpected command' ) ;
@@ -87,7 +88,7 @@ describe('cds compiler command', () => {
87
88
} ) ;
88
89
expect ( childProcess . execFileSync ) . toHaveBeenCalledWith (
89
90
'sh' ,
90
- [ '-c' , 'npx -y --package @sap/cds-dk cds --version' ] ,
91
+ [ '-c' , " 'npx -y --package @sap/cds-dk cds' --version" ] ,
91
92
{
92
93
encoding : 'utf8' ,
93
94
stdio : 'pipe' ,
You can’t perform that action at this time.
0 commit comments