mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-10-14 12:16:37 +00:00
Windows fixes for git widgets
This commit is contained in:
1 parent
27632788a5
commit
479e139141
2 files changed
+3
-3
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user