Skip to content

Commit b5d0587

Browse files
fix: use @electron-forge/cli hint for project resolution (#3023)
We were falling back to the "best guess" behavior for the forge.config.js scenario, we can do better than best guess and infer a forge project based on a forge dependency
1 parent 531788b commit b5d0587

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/api/core/src/util/resolve-dir.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export default async (dir: string): Promise<string | null> => {
3939
return mDir;
4040
}
4141

42+
if (packageJSON.devDependencies?.['@electron-forge/cli']) {
43+
d('package.json with forge dependency found in', testPath);
44+
return mDir;
45+
}
46+
4247
bestGuessDir = mDir;
4348
}
4449
mDir = path.dirname(mDir);

0 commit comments

Comments
 (0)