[ADF-5033] Improve publish script (#5297)

* check if npm package is already present before to publish

* fix lint and remove duplicate password

* fix script
This commit is contained in:
Eugenio Romano
2019-11-29 14:51:46 +00:00
committed by GitHub
parent 8541591816
commit cf83630573
5 changed files with 46 additions and 21 deletions

View File

@@ -29,7 +29,13 @@ export function exec(command: string, args?: string[], opts?: { cwd?: string })
const { status, error, stderr, stdout } = spawnSync(command, args, { ...opts });
if (status !== 0) {
logger.error(`Command failed: ${command} ${args.map((x) => JSON.stringify(x)).join(', ')}`);
if (args) {
logger.error(`Command failed: ${command} ${args.map((x) => JSON.stringify(x)).join(', ')}`);
} else {
logger.error(`Command failed ${command}`);
}
if (error) {
logger.error('Error: ' + (error ? error.message : 'undefined'));
} else {