Early return if nothing selected

Signed-off-by: Marcus Eide <eide@spotify.com>
This commit is contained in:
Marcus Eide
2023-05-16 09:53:42 +02:00
parent 576ba9fc17
commit bac63d0e28
+9 -9
View File
@@ -51,6 +51,15 @@ export async function command(): Promise<void> {
const { shouldSetupAuth, shouldSetupScaffolder, shouldDiscoverEntities } =
answers;
if (!shouldSetupAuth && !shouldSetupScaffolder && !shouldDiscoverEntities) {
Task.log(
chalk.yellow(
'If you change your mind, feel free to re-run this command.',
),
);
return;
}
let providerInfo;
if (shouldSetupAuth) {
providerInfo = await auth();
@@ -64,15 +73,6 @@ export async function command(): Promise<void> {
await discover(providerInfo);
}
if (!shouldSetupAuth && !shouldSetupScaffolder && !shouldDiscoverEntities) {
Task.log(
chalk.yellow(
'If you change your mind, feel free to re-run this command.',
),
);
return;
}
Task.log();
Task.log(
`You can now start your app with ${chalk.inverse(