File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,9 @@ function gitVersion() {
5252 return 0 ;
5353 }
5454 try {
55- return [Int32 ]::Parse((git rev- list -- count " $baseCommit ..HEAD" )) + $baseCommitRev ;
55+ return [Int32 ]::Parse((git rev- list -- count " $baseCommit ..HEAD" 2>&1 | Tee-Object - Variable cmdOutput )) + $baseCommitRev ;
5656 } catch {
57+ Write-Host $cmdOutput
5758 return 0 ;
5859 }
5960}
@@ -63,8 +64,9 @@ function gitCommitHash() {
6364 return " 0000000000000000000000000000000000000000" ;
6465 }
6566 try {
66- return (git rev- list -- max- count 1 HEAD);
67+ return (git rev- list -- max- count 1 HEAD 2>&1 | Tee-Object - Variable cmdOutput );
6768 } catch {
69+ Write-Host $cmdOutput
6870 return " 0000000000000000000000000000000000000000" ;
6971 }
7072}
@@ -74,8 +76,9 @@ function gitShortCommitHash() {
7476 return " 00000000" ;
7577 }
7678 try {
77- return (git rev- parse -- short= 8 (git rev- list -- max- count 1 HEAD) );
79+ return (git rev- parse -- short= 8 (git rev- list -- max- count 1 HEAD 2>&1 | Tee-Object - Variable cmdOutput) 2>&1 | Tee-Object - Variable cmdOutput );
7880 } catch {
81+ Write-Host $cmdOutput
7982 return " 00000000" ;
8083 }
8184}
You can’t perform that action at this time.
0 commit comments