From 1f56eb7e35bb5f3bf6fb27376d3d7bbf735682dd Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 12 Sep 2024 21:06:09 +0000 Subject: [PATCH] Use shell replacement for scripts --- .../java/io/xpipe/ext/base/action/RunScriptActionMenu.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java b/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java index bf16b0b97..aa9dfed75 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/action/RunScriptActionMenu.java @@ -3,6 +3,7 @@ package io.xpipe.ext.base.action; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppI18n; import io.xpipe.app.ext.ActionProvider; +import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.TerminalLauncher; @@ -274,7 +275,8 @@ public class RunScriptActionMenu implements ActionProvider { @Override public List getChildren(DataStoreEntryRef store) { - var state = store.getEntry().getStorePersistentState(); + var replacement = ProcessControlProvider.get().replace(store); + var state = replacement.getEntry().getStorePersistentState(); if (!(state instanceof ShellStoreState shellStoreState) || shellStoreState.getShellDialect() == null) { return List.of(new NoScriptsActionProvider()); }