From adf0e2cdafb6d16dbbbc1905d379879a96dc5176 Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Fri, 21 Apr 2017 08:41:43 +1000 Subject: [PATCH] Adjust style, use $env:userprofile for consistency --- lib/core.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index 67a89b8b7..72a8898e4 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -87,8 +87,7 @@ function fullpath($path) { # should be ~ rooted } function relpath($path) { "$($myinvocation.psscriptroot)\$path" } # relative to calling script function friendly_path($path) { - $h = $home.ToString() - if(!$h.endswith('\')) { $h += '\' } + $h = "$env:userprofile"; if(!$h.endswith('\')) { $h += '\' } if($h -eq '\') { return $path } return "$path" -replace ([regex]::escape($h)), "~\" }