Skip to content

Commit 2e55221

Browse files
committed
Clarify prompt functions
1 parent b7bbfbd commit 2e55221

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/eas-cli/src/credentials/manager/SelectPlatform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ManageIos } from './ManageIos';
33
import { Analytics } from '../../analytics/AnalyticsManager';
44
import { DynamicConfigContextFn } from '../../commandUtils/context/DynamicProjectConfigContextField';
55
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
6-
import { selectPlatformAsync } from '../../platform';
6+
import { selectPlatformWithExitOptionAsync } from '../../platform';
77
import { Actor } from '../../user/User';
88
import { Client } from '../../vcs/vcs';
99
import { CredentialsContextProjectInfo } from '../context';
@@ -20,7 +20,7 @@ export class SelectPlatform {
2020
) {}
2121

2222
async runAsync(): Promise<void> {
23-
const platform = await selectPlatformAsync(this.flagPlatform, true /* allowExit */);
23+
const platform = await selectPlatformWithExitOptionAsync(this.flagPlatform);
2424

2525
if (platform === 'ios') {
2626
await new ManageIos(this, process.cwd()).runAsync();

packages/eas-cli/src/platform.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ export async function selectRequestedPlatformAsync(platform?: string): Promise<R
4848
return requestedPlatform;
4949
}
5050

51-
export async function selectPlatformAsync(
51+
export async function selectPlatformWithExitOptionAsync(platform?: string): Promise<Platform> {
52+
return await selectPlatformInternalAsync(platform, true);
53+
}
54+
export async function selectPlatformAsync(platform?: string): Promise<Platform> {
55+
return await selectPlatformInternalAsync(platform, false);
56+
}
57+
58+
async function selectPlatformInternalAsync(
5259
platform?: string,
5360
allowExit?: boolean
5461
): Promise<Platform> {

0 commit comments

Comments
 (0)