Fix testhost depproj chmod when win host restored (dotnet/corefx#34335)
authorDavis Goodin <dagood@users.noreply.github.com>
Thu, 3 Jan 2019 19:44:30 +0000 (13:44 -0600)
committerGitHub <noreply@github.com>
Thu, 3 Jan 2019 19:44:30 +0000 (13:44 -0600)
When building on Linux, this Exec assumes a Linux configuration is
restored so the testhost package it picks up will have dotnet. This
fails with '-allconfigurations' when a Windows configuration is used and
the restore actually got dotnet.exe. This change detects whatever dotnet
file was actually restored and runs chmod on that.

Commit migrated from https://github.com/dotnet/corefx/commit/70d08ae0b1f2487f0684a66be364a988f181567d

src/libraries/external/runtime/runtime.depproj

index 9d457a5..5759bcf 100644 (file)
@@ -91,7 +91,7 @@
           SkipUnchangedFiles="true"
           UseHardlinksIfPossible="$(UseHardlink)" />
 
-    <Exec Command="chmod +x $(TestHostRootPath)dotnet" Condition="'$(RunningOnUnix)' == 'true'"/>
+    <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(RunningOnUnix)' == 'true'"/>
   </Target>
 
   <PropertyGroup>