Skip to content

Commit 99b1021

Browse files
author
Akos Kitta
committed
fix: do not merge in app+CLI versions in dev mode
when running in dev mode, the backend application is not bundled. hence, the FS paths of the source `package.json`s are different.
1 parent 76d46d4 commit 99b1021

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arduino-ide-extension/src/electron-main/theia/electron-main-application.ts

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { promises as fs, rm, rmSync } from 'node:fs';
1313
import type { MaybePromise, Mutable } from '@theia/core/lib/common/types';
1414
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token';
1515
import { FrontendApplicationConfig } from '@theia/application-package/lib/application-props';
16+
import { environment } from '@theia/application-package/lib/environment';
1617
import {
1718
ElectronMainApplication as TheiaElectronMainApplication,
1819
ElectronMainExecutionParams,
@@ -702,6 +703,12 @@ class InterruptWorkspaceRestoreError extends Error {
702703
async function updateFrontendApplicationConfigFromPackageJson(
703704
config: FrontendApplicationConfig
704705
): Promise<FrontendApplicationConfig> {
706+
if (environment.electron.isDevMode()) {
707+
console.debug(
708+
'Skipping frontend application configuration customizations. Running in dev mode.'
709+
);
710+
return config;
711+
}
705712
try {
706713
const modulePath = __filename;
707714
// must go from `./lib/backend/electron-main.js` to `./package.json` when the app is webpacked.

0 commit comments

Comments
 (0)