Skip to content

Commit 7224ddd

Browse files
wip
1 parent 0dff87e commit 7224ddd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

electron-app/scripts/package.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ async function run() {
88
/** @type {string} */
99
const electronVersion =
1010
require('../package.json').devDependencies['electron'];
11+
const cleanElectronVersion = semver.clean(electronVersion.replace(/^\^/, ''));
12+
if (!cleanElectronVersion) {
13+
throw new Error(
14+
`Electron semver validation failed for version: '${electronVersion}'.`
15+
);
16+
}
1117
const platform = electronPlatform();
1218
const version = await getVersion();
1319
/** @type {string|unknown} */
@@ -18,7 +24,7 @@ async function run() {
1824
'--publish',
1925
'never',
2026
'-c.electronVersion',
21-
semver.clean(electronVersion.replace(/^\^/, '')),
27+
cleanElectronVersion,
2228
'-c.extraMetadata.version',
2329
version,
2430
// overrides the `name` in the `package.json` to keep the `localStorage` location. (https://github.com/arduino/arduino-ide/pull/2144#pullrequestreview-1554005028)
@@ -45,7 +51,11 @@ async function run() {
4551
// updateChannel
4652
// );
4753
}
48-
const cp = exec('electron-builder', args, { stdio: 'inherit' });
54+
const cp = exec(
55+
'DEBUG=* DEBUG_DMG=true ELECTRON_BUILDER_VERBOSE=true electron-builder',
56+
args,
57+
{ stdio: 'inherit' }
58+
);
4959
await cp;
5060
}
5161

0 commit comments

Comments
 (0)