mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Expect custom script failures
This commit is contained in:
parent
abbb8a0fcd
commit
a18d94fb8d
1 changed files with 6 additions and 2 deletions
|
@ -7,6 +7,7 @@ import io.xpipe.app.browser.file.BrowserEntry;
|
|||
import io.xpipe.app.browser.fs.OpenFileSystemModel;
|
||||
import io.xpipe.app.browser.session.BrowserSessionModel;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.util.ScriptHelper;
|
||||
import io.xpipe.core.process.ShellControl;
|
||||
|
@ -89,8 +90,11 @@ public class RunScriptAction implements BrowserAction, BranchAction {
|
|||
if (model.getBrowserModel() instanceof BrowserSessionModel bm) {
|
||||
var content = e.getValue().assemble(sc);
|
||||
var script = ScriptHelper.createExecScript(sc, content);
|
||||
sc.executeSimpleCommand(
|
||||
sc.getShellDialect().runScriptCommand(sc, script.toString()) + " " + args);
|
||||
try {
|
||||
sc.executeSimpleCommand(sc.getShellDialect().runScriptCommand(sc, script.toString()) + " " + args);
|
||||
} catch (Exception ex) {
|
||||
throw ErrorEvent.expected(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue