diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index b7383de236a..5d42ad7a3a2 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -598,6 +598,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { return Effect.scoped( Effect.gen(function* () { + const path = yield* Path.Path; const fixture = yield* makeWindowsPayloadFixture({ copyUnpackedNatives: true }); yield* validateWindowsPackagedPayload({ stageDistDir: fixture.stageDistDir, @@ -606,7 +607,11 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { }); assert.isFalse( - commands.some((command) => command.options.env?.ELECTRON_RUN_AS_NODE === "1"), + commands.some( + (command) => + command.command === path.join(fixture.packagedAppDir, fixture.appExecutableName) && + command.options.env?.ELECTRON_RUN_AS_NODE === "1", + ), ); assert.isTrue( commands.some(