diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-12-19 16:11:20 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-12-19 16:11:34 -0800 |
| commit | 7e1a737ba4ef1fb0377b75c4a64973f821a561d0 (patch) | |
| tree | 813ceb8bedbd66bfcf3d84a9a4b611ee65d40eb3 /scripts | |
| parent | 891e72af66d173c7e09cc3e52475309e2191e18d (diff) | |
| download | vcpkg-7e1a737ba4ef1fb0377b75c4a64973f821a561d0.tar.gz vcpkg-7e1a737ba4ef1fb0377b75c4a64973f821a561d0.zip | |
[vcpkg-integrate-powershell] Fix $false bug. Fixes #2397.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/addPoshVcpkgToPowershellProfile.ps1 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index 92a7573e4..7a12e7d34 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -5,11 +5,12 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] { if (!(Test-Path $path)) { - return $false + return } $fileContents = Get-Content $path - return $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' + $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' + return } $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition |
