From 3492cb33f5419e51a660e1b461767a79ccd33dfd Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Wed, 30 Jul 2025 17:16:07 -0300 Subject: [PATCH] :boom: fix(runner/plugins/shell): description defined as boolean instead of string in condition check --- ags/runner/plugins/shell.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ags/runner/plugins/shell.ts b/ags/runner/plugins/shell.ts index 20cc771..cf48e3b 100644 --- a/ags/runner/plugins/shell.ts +++ b/ags/runner/plugins/shell.ts @@ -24,10 +24,12 @@ export const PluginShell = (() => { } const command = input ? GLib.shell_parse_argv(input) : undefined; + const shellSplit = shell.split('/'), + shellName = shellSplit[shellSplit.length-1]; return { actionClick: () => { - if(!command || !command[0]) return; + if(!command?.[0] || !command[1]) return; const proc = procLauncher.spawnv([ shell, "-c", `${input}` ]); proc.communicate_utf8_async(null, null, (_, asyncResult) => { @@ -52,8 +54,10 @@ export const PluginShell = (() => { }); }); }, - title: `Run ${input ? ` \`${input}\`` : `with ${shell.split('/')[shell.split('/').length-1]}`}`, - description: (input || showOutputNotif) && `${input ? `${shell}\t` : ""}${ showOutputNotif ? "(showing output on notification)" : "" }`, + title: `Run ${input ? ` \`${input}\`` : `with ${shellName}`}`, + description: input || showOutputNotif ? `${input ? `${shell}\t` : ""}${ + showOutputNotif ? "(showing output on notification)" : "" }` + : "", icon: "utilities-terminal-symbolic" }; }