Skip to content

Commit

Permalink
If relative $Path, resolve it to full path right from Invoke-PSCodeHe…
Browse files Browse the repository at this point in the history
…alth
  • Loading branch information
MathieuBuisson committed Oct 6, 2017
1 parent e74e927 commit 0760ddb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PSCodeHealth/Public/Invoke-PSCodeHealth.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ Function Invoke-PSCodeHealth {
[switch]$PassThru

)
If ( -not($PSBoundParameters.ContainsKey('Path')) ) {

If ( $PSBoundParameters.ContainsKey('Path') ) {
$Path = (Resolve-Path -Path $Path).Path
}
Else {
If ( $PWD.Provider.Name -eq 'FileSystem' ) {
$Path = $PWD.ProviderPath
}
Expand Down

0 comments on commit 0760ddb

Please sign in to comment.