Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/collect-npm-licences.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ const LICENCE_FILE = /^(LICEN[CS]E|COPYING|NOTICE)(\..*)?$/i;
* since `files` takes node_modules minus devDependencies.
*/
function productionTree() {
// `npm` is `npm.cmd` on Windows, and execFileSync does not consult PATHEXT —
// so the bare name is ENOENT there, which failed packaging on a Windows runner
// before it reached electron-builder.
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const json = execFileSync(
'npm',
npm,
['ls', '--omit=dev', '--all', '--json', '--long'],
{ cwd: APP_ELECTRON, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 }
);
Expand Down