e2e: update command used to set registry to work with NPM and Yarn 1

There is no need to make it works with Yarn 2 as it now comes later in the process.
This commit is contained in:
Gaëtan Maisse 2021-04-30 08:39:09 +02:00
parent 8ac0be88b2
commit 70cefbaa53
No known key found for this signature in database
GPG Key ID: D934C0EF3714A8A8

View File

@ -58,9 +58,7 @@ const startVerdaccio = (port: number) => {
};
const registryUrl = (command: string, url?: string) =>
new Promise<string>((res, rej) => {
const args = url
? ['config', 'set', 'npmRegistryServer', url]
: ['config', 'get', 'npmRegistryServer'];
const args = url ? ['config', 'set', 'registry', url] : ['config', 'get', 'registry'];
exec(`${command} ${args.join(' ')}`, (e, stdout) => {
if (e) {
rej(e);