💥 fix(runner/plugins/shell): description defined as boolean instead of string in condition check

This commit is contained in:
retrozinndev
2025-07-30 17:16:07 -03:00
parent 2c0871602a
commit 3492cb33f5
+7 -3
View File
@@ -24,10 +24,12 @@ export const PluginShell = (() => {
} }
const command = input ? GLib.shell_parse_argv(input) : undefined; const command = input ? GLib.shell_parse_argv(input) : undefined;
const shellSplit = shell.split('/'),
shellName = shellSplit[shellSplit.length-1];
return { return {
actionClick: () => { actionClick: () => {
if(!command || !command[0]) return; if(!command?.[0] || !command[1]) return;
const proc = procLauncher.spawnv([ shell, "-c", `${input}` ]); const proc = procLauncher.spawnv([ shell, "-c", `${input}` ]);
proc.communicate_utf8_async(null, null, (_, asyncResult) => { 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]}`}`, title: `Run ${input ? ` \`${input}\`` : `with ${shellName}`}`,
description: (input || showOutputNotif) && `${input ? `${shell}\t` : ""}${ showOutputNotif ? "(showing output on notification)" : "" }`, description: input || showOutputNotif ? `${input ? `${shell}\t` : ""}${
showOutputNotif ? "(showing output on notification)" : "" }`
: "",
icon: "utilities-terminal-symbolic" icon: "utilities-terminal-symbolic"
}; };
} }