Skip to content

Commit 4817c1c

Browse files
committed
fix(init): prompt for a name if an old config does not exist (#836)
1 parent 9c514be commit 4817c1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/commands/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export class InitCommand extends ApifyCommand<typeof InitCommand> {
8383
}
8484

8585
if (!actorName) {
86-
let response = actorConfig.isOk() ? { actName: actorConfig.unwrap().config.name as string } : null;
86+
let response = actorConfig.isOkAnd((cfg) => cfg.exists)
87+
? { actName: actorConfig.unwrap().config.name as string }
88+
: null;
8789

8890
while (!response) {
8991
try {

0 commit comments

Comments
 (0)