Skip to content

Commit

Permalink
Reorder command condition
Browse files Browse the repository at this point in the history
Better for code search.
  • Loading branch information
gitfool authored and kzu committed May 30, 2024
1 parent 3066410 commit a4baece
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@
<_IsGitFile>$([System.IO.File]::Exists('$(GitDir)'))</_IsGitFile>
</PropertyGroup>

<Exec Condition="'$(_IsGitFile)' == 'true'"
Command='$(GitExe) rev-parse --is-inside-work-tree'
<Exec Command='$(GitExe) rev-parse --is-inside-work-tree'
Condition="'$(_IsGitFile)' == 'true'"
EchoOff='true'
StandardErrorImportance='high'
StandardOutputImportance='low'
Expand All @@ -297,8 +297,8 @@
<_IsGitWorkTree>$(_GitIsWorkTree.Trim())</_IsGitWorkTree>
</PropertyGroup>

<Exec Condition="'$(_IsGitFile)' == 'true' and '$(_IsGitWorkTree)' == 'true'"
Command='$(GitExe) rev-parse --git-common-dir'
<Exec Command='$(GitExe) rev-parse --git-common-dir'
Condition="'$(_IsGitFile)' == 'true' and '$(_IsGitWorkTree)' == 'true'"
EchoOff='true'
StandardErrorImportance='high'
StandardOutputImportance='low'
Expand Down Expand Up @@ -1036,8 +1036,8 @@
</PropertyGroup>

<!-- If we didn't find it in the PATH nor the above locations, check for git installed in WSL -->
<Exec Condition="'$(GitExe)' == ''"
Command='"$(MSBuildThisFileDirectory)wslrun.cmd" git --version'
<Exec Command='"$(MSBuildThisFileDirectory)wslrun.cmd" git --version'
Condition="'$(GitExe)' == ''"
EchoOff='true'
ContinueOnError='true'
StandardErrorImportance='high'
Expand Down

0 comments on commit a4baece

Please sign in to comment.