Skip to content

Commit

Permalink
fix: use @electron-forge/cli hint for project resolution (#3023)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MarshallOfSound committed Oct 31, 2022
1 parent 531788b commit b5d0587
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/api/core/src/util/resolve-dir.ts
Expand Up @@ -39,6 +39,11 @@ export default async (dir: string): Promise<string | null> => {
return mDir;
}

if (packageJSON.devDependencies?.['@electron-forge/cli']) {
d('package.json with forge dependency found in', testPath);
return mDir;
}

bestGuessDir = mDir;
}
mDir = path.dirname(mDir);
Expand Down

0 comments on commit b5d0587

Please sign in to comment.