Skip to content

Commit

Permalink
fix: do not merge in app+CLI versions in dev mode
Browse files Browse the repository at this point in the history
when running in dev mode, the backend application is not bundled.
hence, the FS paths of the source `package.json`s are different.
  • Loading branch information
Akos Kitta committed Aug 15, 2023
1 parent 76d46d4 commit 99b1021
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { promises as fs, rm, rmSync } from 'node:fs';
import type { MaybePromise, Mutable } from '@theia/core/lib/common/types';
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token';
import { FrontendApplicationConfig } from '@theia/application-package/lib/application-props';
import { environment } from '@theia/application-package/lib/environment';
import {
ElectronMainApplication as TheiaElectronMainApplication,
ElectronMainExecutionParams,
Expand Down Expand Up @@ -702,6 +703,12 @@ class InterruptWorkspaceRestoreError extends Error {
async function updateFrontendApplicationConfigFromPackageJson(
config: FrontendApplicationConfig
): Promise<FrontendApplicationConfig> {
if (environment.electron.isDevMode()) {
console.debug(
'Skipping frontend application configuration customizations. Running in dev mode.'
);
return config;
}
try {
const modulePath = __filename;
// must go from `./lib/backend/electron-main.js` to `./package.json` when the app is webpacked.
Expand Down

0 comments on commit 99b1021

Please sign in to comment.