Skip to content

Commit 26fcd66

Browse files
authored
fix(init): prompt for a name if an old config does not exist (#836)
1 parent 700ea83 commit 26fcd66

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
@@ -86,7 +86,9 @@ export class InitCommand extends ApifyCommand<typeof InitCommand> {
8686
}
8787

8888
if (!actorName) {
89-
let response = actorConfig.isOk() ? { actName: actorConfig.unwrap().config.name as string } : null;
89+
let response = actorConfig.isOkAnd((cfg) => cfg.exists)
90+
? { actName: actorConfig.unwrap().config.name as string }
91+
: null;
9092

9193
while (!response) {
9294
try {

0 commit comments

Comments
 (0)