Skip to content

Commit 07e801a

Browse files
committed
fix(actors): correctly parse waitforfinish flag
Resolves an issue where waitForFinishMillis could be NaN for invalid flag inputs, leading to unexpected behavior.
1 parent 02f304a commit 07e801a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/commands/actors/push.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,8 @@ export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
190190
buildTag = DEFAULT_BUILD_TAG;
191191
}
192192

193-
const waitForFinishMillis = Number.isNaN(this.flags.waitForFinish)
194-
? undefined
195-
: Number.parseInt(this.flags.waitForFinish!, 10) * 1000;
193+
const parsedWaitForFinish = this.flags.waitForFinish ? Number.parseInt(this.flags.waitForFinish, 10) : Number.NaN;
194+
const waitForFinishMillis = Number.isFinite(parsedWaitForFinish) ? parsedWaitForFinish * 1000 : undefined;
196195

197196
// User can override actorId of pushing Actor.
198197
// It causes that we push Actor to this id but attributes in localConfig will remain same.

0 commit comments

Comments
 (0)