Skip to content

Commit 3496199

Browse files
committed
fix: use zurk for command execution
1 parent 3688a21 commit 3496199

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { FastAlfred } from 'fast-alfred';
2-
import { exec } from 'node:child_process';
3-
import { promisify } from 'node:util';
4-
5-
const execPrm = promisify(exec);
2+
import { $ } from 'zurk';
63

74
(async () => {
85
const alfredClient = new FastAlfred();
@@ -13,8 +10,6 @@ const execPrm = promisify(exec);
1310
incognito = false,
1411
}: { profile: string; url: string; incognito: boolean } = JSON.parse(alfredClient.input);
1512

16-
const command = `open -g -na 'Google Chrome' --args ${
17-
incognito ? '--incognito' : ''
18-
} --profile-directory='${profile}' '${url}'`;
19-
await execPrm(command);
13+
const incognitoStr = incognito ? '--incognito' : '';
14+
await $`open -g -na 'Google Chrome' --args ${incognitoStr} --profile-directory=${profile} ${url}`;
2015
})();

0 commit comments

Comments
 (0)