Private/ResolveRelativePath.ps1

1
2
3
4
5
6
7
8
9
10
11
12
function ResolveRelativePath {
    [OutputType([System.Management.Automation.PathInfo])]
    [CmdletBinding()]
    param([string]$Path)
    end {
        if ($resolved = (Resolve-Path (Join-Path $psEditor.Workspace.Path $Path) -ErrorAction Ignore)) {
            return $resolved
        }
        return Resolve-Path $Path
    }
}