Skip to content

Commit

Permalink
IsGitRepo: remove usage of --is-inside-work-tree in order to support …
Browse files Browse the repository at this point in the history
…composite builds
  • Loading branch information
rpalcolea committed Jan 9, 2024
1 parent a8bc821 commit 63d9071
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ abstract class IsGitRepo extends GitReadCommand {
@Override
String obtain() {
try {
return executeGitCommand( "rev-parse", "--is-inside-work-tree").contains("true")
return !executeGitCommand( "rev-parse").contains("fatal: not a git repository")
} catch (Exception e) {
return false
}
Expand Down

0 comments on commit 63d9071

Please sign in to comment.