Fix adding tools directory to PATH for native installers.

This commit fixes adding the tools directory to the user's PATH for the native
installers.

The issue was a regression caused by #8886.  The change used a "no-op" sentinel
file that reported it existed.  This "no-op" sentinel was used for the native
installers.  Unlike the other "no-op" sentinels used by the native installer,
we do want PATH to be modified by the native installer.

The fix is to change the "no-op" sentinel to report the file doesn't exist, but
also to not to attempt to create the file.

This fixes #9208.
This commit is contained in:
Peter Huene 2018-05-07 16:35:29 -07:00
parent e7ebf48578
commit 0f0f70ce48
No known key found for this signature in database
GPG key ID: E1D265D820213D6A
3 changed files with 53 additions and 2 deletions

View file

@ -147,7 +147,7 @@ namespace Microsoft.DotNet.Cli
{
aspNetCertificateSentinel = new NoOpAspNetCertificateSentinel();
firstTimeUseNoticeSentinel = new NoOpFirstTimeUseNoticeSentinel();
toolPathSentinel = new NoOpFileSentinel();
toolPathSentinel = new NoOpFileSentinel(exists: false);
hasSuperUserAccess = true;
}