@@ -17,7 +17,7 @@ import stream from "#core/stream";
1717import tar from "#core/tar" ;
1818import Table from "#core/text/table" ;
1919import { TmpDir , TmpFile } from "#core/tmp" ;
20- import { confirm , objectIsEmpty , repeatAction , shellEscape } from "#core/utils" ;
20+ import { confirm , objectIsEmpty , repeatAction , shellQuote } from "#core/utils" ;
2121import * as yaml from "#core/yaml" ;
2222import Git from "#lib/git" ;
2323import lintFile from "#lib/lint/file" ;
@@ -372,7 +372,7 @@ export default class Package {
372372 // pack package
373373 res = await repeatAction ( async ( ) => {
374374 const tmpDir = new TmpDir ( ) ,
375- command = shellEscape ( [ "npm" , "pack" , "--json" , "--pack-destination" , tmpDir . path , this . root ] ) ;
375+ command = shellQuote ( [ "npm" , "pack" , "--json" , "--pack-destination" , tmpDir . path , this . root ] ) ;
376376
377377 console . log ( "Packing:" , command ) ;
378378
@@ -435,7 +435,7 @@ export default class Package {
435435
436436 args . push ( pack . path ) ;
437437
438- const command = shellEscape ( args ) ;
438+ const command = shellQuote ( args ) ;
439439
440440 res = await repeatAction ( async ( ) => {
441441 console . log ( "Publishing:" , command ) ;
@@ -461,7 +461,7 @@ export default class Package {
461461 // add additional tags
462462 if ( addTags . length ) {
463463 for ( const tag of addTags ) {
464- const command = shellEscape ( [ "npm" , "dist-tag" , "add" , `${ this . name } @${ this . version } ` , tag ] ) ;
464+ const command = shellQuote ( [ "npm" , "dist-tag" , "add" , `${ this . name } @${ this . version } ` , tag ] ) ;
465465
466466 res = await repeatAction ( async ( ) => {
467467 console . log ( "Adding npm tag:" , command ) ;
@@ -628,7 +628,7 @@ export default class Package {
628628 }
629629
630630 runCommand ( command , ...args ) {
631- const res = childProcess . spawnSync ( shellEscape ( [ command , ...args ] ) , {
631+ const res = childProcess . spawnSync ( shellQuote ( [ command , ...args ] ) , {
632632 "cwd" : this . root ,
633633 "stdio" : "inherit" ,
634634 "shell" : true ,
@@ -652,7 +652,7 @@ export default class Package {
652652 argv = [ ] ;
653653 }
654654
655- const res = childProcess . spawnSync ( shellEscape ( [ "npm" , "run" , script , ...argv ] ) , {
655+ const res = childProcess . spawnSync ( shellQuote ( [ "npm" , "run" , script , ...argv ] ) , {
656656 "cwd" : this . root ,
657657 "stdio" : "inherit" ,
658658 "shell" : true ,
0 commit comments