diff --git a/src/widgets/GitBranch.ts b/src/widgets/GitBranch.ts index aceeaa0..c61984d 100644 --- a/src/widgets/GitBranch.ts +++ b/src/widgets/GitBranch.ts @@ -30,7 +30,7 @@ export class GitBranchWidget implements Widget { private getGitBranch(): string | null { try { - const branch = execSync('git branch --show-current 2>/dev/null', { + const branch = execSync('git branch --show-current', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim(); diff --git a/src/widgets/GitChanges.ts b/src/widgets/GitChanges.ts index 1234fb5..c2d8609 100644 --- a/src/widgets/GitChanges.ts +++ b/src/widgets/GitChanges.ts @@ -33,12 +33,12 @@ export class GitChangesWidget implements Widget { let totalInsertions = 0; let totalDeletions = 0; - const unstagedStat = execSync('git diff --shortstat 2>/dev/null', { + const unstagedStat = execSync('git diff --shortstat', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim(); - const stagedStat = execSync('git diff --cached --shortstat 2>/dev/null', { + const stagedStat = execSync('git diff --cached --shortstat', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();