Просмотр исходного кода

Correct `<Exec />` commands on Windows to handle spaces in root path (#18285)

- #15055
- add a few more quotation marks
Doug Bunting 6 лет назад
Родитель
Сommit
d0c71edd84
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      eng/targets/Npm.Common.targets
  2. 3 3
      src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

+ 1 - 1
eng/targets/Npm.Common.targets

@@ -101,7 +101,7 @@
     <Copy SourceFiles="$(PackageJson)" DestinationFiles="$(_BackupPackageJson)" />
     <Copy SourceFiles="$(PackageJson)" DestinationFiles="$(_BackupPackageJson)" />
 
 
     <Yarn Command="version --no-git-tag-version --new-version $(PackageVersion)" />
     <Yarn Command="version --no-git-tag-version --new-version $(PackageVersion)" />
-    <Exec Command="node $(MSBuildThisFileDirectory)..\scripts\update-packagejson-links.js $(PackageJson) $(PackageVersion)" />
+    <Exec Command="node &quot;$(MSBuildThisFileDirectory)..\scripts\update-packagejson-links.js&quot; &quot;$(PackageJson)&quot; $(PackageVersion)" />
     <Yarn Command="pack --filename $(PackageFileName)" />
     <Yarn Command="pack --filename $(PackageFileName)" />
 
 
     <Move SourceFiles="$(_PackageTargetPath)" DestinationFolder="$(PackageOutputPath)" />
     <Move SourceFiles="$(_PackageTargetPath)" DestinationFolder="$(PackageOutputPath)" />

+ 3 - 3
src/Framework/ref/Microsoft.AspNetCore.App.Ref.csproj

@@ -195,7 +195,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
           Condition="'$(IsPackable)' == 'true'">
           Condition="'$(IsPackable)' == 'true'">
     <PropertyGroup>
     <PropertyGroup>
       <_TarCommand>tar</_TarCommand>
       <_TarCommand>tar</_TarCommand>
-      <_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">$(RepoRoot).tools\tar.exe</_TarCommand>
+      <_TarCommand Condition="Exists('$(RepoRoot).tools\tar.exe')">"$(RepoRoot).tools\tar.exe"</_TarCommand>
 
 
       <!-- For the tar packed with git, transform e.g. "C:\root\AspNetCore\File.tar.gz" to "/C/root/AspNetCore/File.tar.gz". -->
       <!-- For the tar packed with git, transform e.g. "C:\root\AspNetCore\File.tar.gz" to "/C/root/AspNetCore/File.tar.gz". -->
       <_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
       <_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
@@ -209,8 +209,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
       Overwrite="true" />
       Overwrite="true" />
 
 
     <!-- Requires Windows 10 version 1803 or newer -->
     <!-- Requires Windows 10 version 1803 or newer -->
-    <Message Importance="High" Text="Executing: $(_TarCommand) -czf $(_TarArchiveOutputPath) ." />
-    <Exec Command="$(_TarCommand) -czf $(_TarArchiveOutputPath) ."
+    <Message Importance="High" Text="Executing: $(_TarCommand) -czf &quot;$(_TarArchiveOutputPath)&quot; ." />
+    <Exec Command="$(_TarCommand) -czf &quot;$(_TarArchiveOutputPath)&quot; ."
         WorkingDirectory="$(TargetingPackLayoutRoot)" />
         WorkingDirectory="$(TargetingPackLayoutRoot)" />
 
 
     <Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />
     <Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />