Skip to content

Commit 2dbb08b

Browse files
Fixing bug when there are no args for executable files
1 parent f831f63 commit 2dbb08b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/otherCmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export function startProgram(
8787

8888
let cmd;
8989
let args = [];
90+
executableArgs = executableArgs ? ` ${executableArgs}` : "";
9091
if (desktopFilePath) {
91-
executableArgs = (executableArgs) ? ` ${executableArgs}`: "";
9292
cmd = `awk`;
9393
args.push(
9494
`/^Exec=/ {sub("^Exec=", ""); gsub(" ?%[cDdFfikmNnUuv]", "${executableArgs}"); exit system($0)}`
@@ -98,7 +98,7 @@ export function startProgram(
9898
const parsedCmd = parseCmdArgs(executableFile);
9999
cmd = parsedCmd[0];
100100
args = parsedCmd[1];
101-
args = args.concat(executableArgs.split(' '));
101+
args = args.concat(executableArgs.split(" "));
102102
}
103103

104104
return new Promise(fulfill => {

0 commit comments

Comments
 (0)