Fix application launch debug output

This commit is contained in:
crschnick 2023-07-09 06:51:34 +00:00
parent e9982b4903
commit 5cfe1eddfd

View file

@ -10,12 +10,11 @@ import java.util.function.Function;
public class ApplicationHelper {
public static void executeLocalApplication(Function<ShellControl, String> s, boolean detach) throws Exception {
TrackEvent.withDebug("proc", "Executing local application")
.tag("command", s)
.handle();
try (var sc = LocalStore.getShell().start()) {
var cmd = detach ? ScriptHelper.createDetachCommand(sc, s.apply(sc)) : s.apply(sc);
TrackEvent.withDebug("proc", "Executing local application")
.tag("command", cmd)
.handle();
try (var c = sc.command(cmd).start()) {
c.discardOrThrow();
}