diff --git a/src/cli.ts b/src/cli.ts index d14df1c..5e5a1de 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -73,8 +73,11 @@ main(async () => { ); const failureCount = Object.values(result).reduce((count, result) => { - if (!result.success) return count++; - else return count; + if (!result.success) { + logger.error(result.err); + return count++; + } + return count; }, 0); process.exit(failureCount); diff --git a/src/stores/edge-addon-store.ts b/src/stores/edge-addon-store.ts index d20387c..3534f5c 100644 --- a/src/stores/edge-addon-store.ts +++ b/src/stores/edge-addon-store.ts @@ -78,7 +78,7 @@ export class EdgeAddonStore implements IStore { } while (operation.status === 'InProgress'); if (operation.status === 'Failed') { - this.deps.logger.error(`Validation Failed: ${operation.message}`); + throw Error(`Validation failed: ${operation.message}`); } else { this.log('Extension is valid: ' + operation.message); } diff --git a/src/stores/firefox-addon-store.ts b/src/stores/firefox-addon-store.ts index 2551088..a903526 100644 --- a/src/stores/firefox-addon-store.ts +++ b/src/stores/firefox-addon-store.ts @@ -62,7 +62,7 @@ export class FirefoxAddonStore implements IStore { )}, ${plural(notices, 'notice')}`, ); if (!upload.valid) throw Error(`Extension is invalid: ${validationUrl}`); - else this.log(`Validation results available at: ${validationUrl}`); + else this.log(validationUrl); } private async uploadAndPollValidation(