Skip to content

Commit 27e1dd4

Browse files
pranavcodeantclaude
andcommitted
Apply CodeAnt review fixes for PR #15
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ae810cf commit 27e1dd4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/commands/scans/start-scan.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { exec } from 'child_process';
1+
import { exec, execFile } from 'child_process';
22
import { promisify } from 'util';
33
import { detectRepoName } from '../../scm/index.js';
44
import { startScan } from '../../scans/startScan.js';
55

66
const execAsync = promisify(exec);
7+
const execFileAsync = promisify(execFile);
78

89
// Mirrors splitGlobs in src/index.js (not exported) — preserves commas inside {} brace expansions
910
function splitGlobs(input) {
@@ -35,7 +36,7 @@ async function resolveCurrentBranch() {
3536

3637
async function resolveRemoteCommit(branch) {
3738
try {
38-
const { stdout } = await execAsync(`git ls-remote origin refs/heads/${branch}`);
39+
const { stdout } = await execFileAsync('git', ['ls-remote', 'origin', `refs/heads/${branch}`]);
3940
const sha = stdout.trim().split(/\s+/)[0];
4041
if (!sha) {
4142
const err = new Error(`Branch "${branch}" not found on remote origin. Pass --commit <sha> explicitly.`);

0 commit comments

Comments
 (0)