diff --git a/projects/nx-verdaccio/src/executors/env-bootstrap/npm.ts b/projects/nx-verdaccio/src/executors/env-bootstrap/npm.ts index 2e501488..06725f11 100644 --- a/projects/nx-verdaccio/src/executors/env-bootstrap/npm.ts +++ b/projects/nx-verdaccio/src/executors/env-bootstrap/npm.ts @@ -81,7 +81,7 @@ export async function configureRegistry( ); } - await promisify(exec)(setRegistry, { windowsHide: true, shell: true }); + await promisify(exec)(setRegistry, { windowsHide: true }); /** * Protocol-Agnostic Configuration: The use of // allows NPM to configure authentication for a registry without tying it to a specific protocol (http: or https:). @@ -99,7 +99,7 @@ export async function configureRegistry( formatInfo(`Set authToken:\n${setAuthToken}`, VERDACCIO_ENV_TOKEN) ); } - await promisify(exec)(setAuthToken, { windowsHide: true, shell: true }); + await promisify(exec)(setAuthToken, { windowsHide: true }); } export type UnconfigureRegistryOptions = Pick< @@ -135,7 +135,7 @@ export async function unconfigureRegistry( formatInfo(`Delete authToken:\n${setAuthToken}`, VERDACCIO_ENV_TOKEN) ); } - await promisify(exec)(setAuthToken, { windowsHide: true, shell: true }); + await promisify(exec)(setAuthToken, { windowsHide: true }); const setRegistry = `npm config delete registry ${objectToCliArgs({ userconfig, @@ -145,5 +145,5 @@ export async function unconfigureRegistry( formatInfo(`Delete registry:\n${setRegistry}`, VERDACCIO_ENV_TOKEN) ); } - await promisify(exec)(setRegistry, { windowsHide: true, shell: true }); + await promisify(exec)(setRegistry, { windowsHide: true }); } diff --git a/projects/nx-verdaccio/src/executors/env-bootstrap/npm.unit-test.ts b/projects/nx-verdaccio/src/executors/env-bootstrap/npm.unit-test.ts index 775bac5b..1c1ea9d1 100644 --- a/projects/nx-verdaccio/src/executors/env-bootstrap/npm.unit-test.ts +++ b/projects/nx-verdaccio/src/executors/env-bootstrap/npm.unit-test.ts @@ -48,12 +48,12 @@ describe('configureRegistry', () => { expect(execMock).toHaveBeenCalledTimes(2); expect(execMock).toHaveBeenCalledWith( 'npm config set registry="http://localhost:4873" --userconfig="test-config"', - { windowsHide: true, shell: true } + { windowsHide: true } ); expect(execMock).toHaveBeenCalledWith( 'npm config set //localhost:4873/:_authToken "secretVerdaccioToken" --userconfig="test-config"', - { windowsHide: true, shell: true } + { windowsHide: true } ); }); @@ -100,12 +100,12 @@ describe('unconfigureRegistry', () => { expect(execMock).toHaveBeenCalledTimes(2); expect(execMock).toHaveBeenCalledWith( 'npm config delete registry --userconfig="test-config"', - { windowsHide: true, shell: true } + { windowsHide: true } ); expect(execMock).toHaveBeenCalledWith( 'npm config delete //localhost:4873/:_authToken --userconfig="test-config"', - { windowsHide: true, shell: true } + { windowsHide: true } ); });