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

- #15055
- add a few more quotation marks
This commit is contained in:
Doug Bunting 2020-01-11 13:55:59 -08:00 committed by GitHub
parent 761dc53857
commit d0c71edd84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@
<Copy SourceFiles="$(PackageJson)" DestinationFiles="$(_BackupPackageJson)" />
<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)" />
<Move SourceFiles="$(_PackageTargetPath)" DestinationFolder="$(PackageOutputPath)" />

View File

@ -195,7 +195,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Condition="'$(IsPackable)' == 'true'">
<PropertyGroup>
<_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". -->
<_TarArchiveOutputPath>$(TarArchiveOutputPath)</_TarArchiveOutputPath>
@ -209,8 +209,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Overwrite="true" />
<!-- 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)" />
<Message Importance="High" Text="$(MSBuildProjectName) -> $(TarArchiveOutputPath)" />