Skip to content

Commit da73bc4

Browse files
committed
Rename Path parameter to SourcePath to match other functions
1 parent 6621427 commit da73bc4

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Source/Private/ResolveModuleSource.ps1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ function ResolveModuleSource {
1515
}
1616
})]
1717
[Alias("ModuleManifest")]
18-
[string]$Path = $(Get-Location -PSProvider FileSystem)
18+
[string]$SourcePath = $(Get-Location -PSProvider FileSystem)
1919
)
2020

21-
$ModuleBase = Split-Path $Path -Parent
21+
$ModuleBase = Split-Path $SourcePath -Parent
2222
# Do not use GetFileNameWithoutExtension, because some module names have dots in them
23-
$ModuleName = (Split-Path $Path -Leaf) -replace "\.psd1$"
23+
$ModuleName = (Split-Path $SourcePath -Leaf) -replace "\.psd1$"
2424

25-
# If $Path points to a build file, switch to the manifest
26-
if (Test-Path $Path -PathType Leaf) {
25+
# If $SourcePath points to a build file, switch to the manifest
26+
if (Test-Path $SourcePath -PathType Leaf) {
2727
if ($ModuleName -eq "Build") {
28-
$Path = $ModuleBase
28+
$SourcePath = $ModuleBase
2929
}
3030
}
3131

32-
# If $Path is a folder, check for a matching module manifest or build.psd1
33-
if (Test-Path $Path -PathType Container) {
32+
# If $SourcePath is a folder, check for a matching module manifest or build.psd1
33+
if (Test-Path $SourcePath -PathType Container) {
3434
# If we're in a "well known" source folder, look higher for a name
3535
if ($ModuleName -in "Source", "src") {
3636
$ModuleName = Split-Path $ModuleBase -Leaf
3737
}
38-
if ( (Test-Path (Join-Path $Path build.psd1)) -or (Test-Path (Join-Path $Path "$ModuleName.psd1")) ) {
39-
$ModuleBase = $Path
38+
if ( (Test-Path (Join-Path $SourcePath build.psd1)) -or (Test-Path (Join-Path $SourcePath "$ModuleName.psd1")) ) {
39+
$ModuleBase = $SourcePath
4040
} else {
41-
throw "No module found in $Path. Try passing the full path to the module manifest file."
41+
throw "No module found in $SourcePath. Try passing the full path to the module manifest file."
4242
}
4343
}
4444

0 commit comments

Comments
 (0)