Skip to content

Commit

Permalink
Use built-in windows powershell if available
Browse files Browse the repository at this point in the history
This lowers the bar on Windows since PS is built-in there.
  • Loading branch information
kzu committed Jul 22, 2024
1 parent 631b10f commit e580a0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion samples/dotnet/SponsorLink.Analyzer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ partial class SponsorLink
</Target>

<Target Name="DownloadDevloopedJwk" BeforeTargets="GetAssemblyAttributes" Inputs="$(MSBuildProjectFullPath)" Outputs="$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)devlooped.jwk">
<Exec Command="pwsh -nop -f $(MSBuildThisFileDirectory)jwk.ps1" ConsoleToMSBuild="true" EchoOff="true">
<PropertyGroup>
<PwshCmd Condition="'$(OS)' == 'Windows_NT'">powershell</PwshCmd>
<PwshCmd Condition="'$(OS)' != 'Windows_NT'">pwsh</PwshCmd>
</PropertyGroup>
<Exec Command="$(PwshCmd) -nop -f $(MSBuildThisFileDirectory)jwk.ps1" ConsoleToMSBuild="true" EchoOff="true">
<Output TaskParameter="ConsoleOutput" PropertyName="RawJwk"/>
<Output TaskParameter="ExitCode" PropertyName="MSBuildLastExitCode" />
</Exec>
Expand Down

0 comments on commit e580a0b

Please sign in to comment.