Skip to content

Commit

Permalink
Return "" if git not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne St-Pierre authored and Etienne St-Pierre committed Dec 19, 2023
1 parent 5f33ace commit 90ef33c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cli/src/services/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,13 @@ Only your master language should be listed in your files config.`
}

private getCurrentBranchName() {
return execSync('git rev-parse --abbrev-ref HEAD')
.toString('utf8')
.replace(/[\n\r\s]+$/, '');
try {
return execSync('git rev-parse --abbrev-ref HEAD')
.toString('utf8')
.replace(/[\n\r\s]+$/, '');
} catch {
return ""
}
}

private exctractVersionFromBranch(
Expand Down

0 comments on commit 90ef33c

Please sign in to comment.