From e2277b948272eddfc8c0d033ec8b1ba767e1252e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Klocek?= Date: Wed, 15 Dec 2021 13:28:59 +0100 Subject: [PATCH] [eas-cli] Fix ASC prompt displayed in --non-interactive (#841) * [eas-cli] Fix ASC prompt displayed in --non-interactive * Update CHANGELOG.md * Apply feedback - fail in non-interactive --- CHANGELOG.md | 2 ++ packages/eas-cli/src/submit/ios/IosSubmitCommand.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e6361d22..85d0b1a50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐Ÿ› Bug fixes +- Fix `eas submit` displaying a prompt in non-interactive mode when some ASC API credentials are missing in `eas.json`. ([#841](https://github.com/expo/eas-cli/pull/841) by [@barthap](https://github.com/barthap)) + ### ๐Ÿงน Chores ## [0.41.0](https://github.com/expo/eas-cli/releases/tag/v0.41.0) - 2021-12-13 diff --git a/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts b/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts index 20e3029be..278a5b2aa 100644 --- a/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts +++ b/packages/eas-cli/src/submit/ios/IosSubmitCommand.ts @@ -174,7 +174,14 @@ export default class IosSubmitCommand { // interpret this to mean the user had some intention of passing in ASC Api key if (ascApiKeyPath || ascApiKeyIssuerId || ascApiKeyId) { - Log.warn(`ascApiKeyPath, ascApiKeyIssuerId and ascApiKeyId must all be defined in eas.json`); + const message = `ascApiKeyPath, ascApiKeyIssuerId and ascApiKeyId must all be defined in eas.json`; + + // in non-interactive mode, we should fail + if (this.ctx.nonInteractive) { + throw new Error(message); + } + + Log.warn(message); return result({ sourceType: AscApiKeySourceType.prompt, });