File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ export async function installPlaywright(vscode: vscodeTypes.VSCode) {
5252
5353 terminal . show ( ) ;
5454
55+ const shell = path . basename ( vscode . env . shell || '' ) . toLowerCase ( ) ;
56+ const q = shell === 'cmd.exe' || shell === 'cmd' ? '"' : '\'' ;
57+
5558 const args : string [ ] = [ ] ;
5659 if ( result . includes ( chromiumItem ) )
5760 args . push ( '--browser=chromium' ) ;
@@ -68,11 +71,7 @@ export async function installPlaywright(vscode: vscodeTypes.VSCode) {
6871 if ( result . includes ( installDepsItem ) )
6972 args . push ( '--install-deps' ) ;
7073
71- terminal . sendText ( `npm init playwright@latest --yes "--" . ${ quote ( '--quiet' ) } ${ args . map ( quote ) . join ( ' ' ) } ` , true ) ;
72- }
73-
74- function quote ( s : string ) : string {
75- return `'${ s } '` ;
74+ terminal . sendText ( `npm init playwright@latest --yes "--" . ${ q } --quiet${ q } ${ args . map ( a => `${ q } ${ a } ${ q } ` ) . join ( ' ' ) } ` , true ) ;
7675}
7776
7877export async function installBrowsers ( vscode : vscodeTypes . VSCode , model : TestModel ) {
You can’t perform that action at this time.
0 commit comments