Skip to content

Commit eefcac8

Browse files
authored
feat(cli): skip to set env step when env list length is 0(zero) (#409)
Signed-off-by: sunrabbit123 <qudwls185@naver.com>
1 parent 54dcbb8 commit eefcac8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/cli/src/commands/start.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,13 @@ async function askQuestions({ template: defaultTemplate }: Pick<StartOptions, "t
209209
return c.envList;
210210
})));
211211

212-
const isConfirm = await p.confirm({
213-
message: `Do you want to enter environment variables? (Number of environment variables to enter: ${envList.length})
212+
const isConfirm = envList.length === 0
213+
? false
214+
: await p.confirm({
215+
message: `Do you want to enter environment variables? (Number of environment variables to enter: ${envList.length})
214216
${picocolors.cyan("If you press <ctrl+c>, you can skip this step.")}`,
215-
initialValue: false,
216-
});
217+
initialValue: false,
218+
});
217219

218220
const envInfos: EnvInfo[] = [];
219221

0 commit comments

Comments
 (0)