mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-05-04 16:50:37 +00:00
Adjust style, use $env:userprofile for consistency
This commit is contained in:
+1
-2
@@ -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)), "~\"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user