diff --git a/packages/plugin-ext/src/hosted/browser/worker/worker-env-ext.ts b/packages/plugin-ext/src/hosted/browser/worker/worker-env-ext.ts index 8599f1d8667d6..d94a3b3ba51a7 100644 --- a/packages/plugin-ext/src/hosted/browser/worker/worker-env-ext.ts +++ b/packages/plugin-ext/src/hosted/browser/worker/worker-env-ext.ts @@ -28,11 +28,9 @@ export class WorkerEnvExtImpl extends EnvExtImpl { super(); } - /** - * Throw error for app-root as there is no filesystem in worker context - */ override get appRoot(): string { - throw new Error('There is no app root in worker context'); + // The documentation indicates that this should be an empty string + return ''; } get isNewAppInstall(): boolean { diff --git a/packages/plugin/src/theia.d.ts b/packages/plugin/src/theia.d.ts index 535109db71e61..93093b6ab6a76 100644 --- a/packages/plugin/src/theia.d.ts +++ b/packages/plugin/src/theia.d.ts @@ -7734,6 +7734,9 @@ export module '@theia/plugin' { /** * The application root folder from which the editor is running. + * + * *Note* that the value is the empty string when running in an + * environment that has no representation of an application root folder. */ export const appRoot: string;