diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/RunInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue similarity index 88% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/RunInstructions.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue index 8ab15a67..b6d025a1 100644 --- a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/RunInstructions.vue +++ b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue @@ -47,6 +47,8 @@ export default defineComponent({ }, }, setup() { + ensureBrowserEnvironment(); + const { currentState } = injectKey((keys) => keys.useCollectionState); const { projectDetails } = injectKey((keys) => keys.useApplication); @@ -70,6 +72,13 @@ export default defineComponent({ }; }, }); + +function ensureBrowserEnvironment(): void { + const { isRunningAsDesktopApplication } = injectKey((keys) => keys.useRuntimeEnvironment); + if (isRunningAsDesktopApplication) { + throw new Error('Not applicable in desktop environments'); + } +}