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)), "~\" }