Skip to content

Commit d89a357

Browse files
authored
🐛 ModuleFast incorrectly setting Destination to $PWD in SpecFile mode.
Fixes #76
1 parent 895d75b commit d89a357

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ModuleFast.build.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Task CopyFiles {
3636
'ModuleFast.psm1'
3737
'LICENSE'
3838
) -Destination $ModuleOutFolderPath
39+
40+
Copy-Item 'ModuleFast.ps1' -Destination $Destination -Force
3941
}
4042

4143
Task GetNugetVersioningAssembly {

ModuleFast.psm1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,9 @@ function Install-ModuleFast {
349349
$Update = $false
350350
}
351351
} else {
352-
$Destination = $PWD
353-
$specFiles = Find-RequiredSpecFile $Destination -CILockFileHint $CILockFilePath
352+
$specFiles = Find-RequiredSpecFile $PWD -CILockFileHint $CILockFilePath
354353
if (-not $specFiles) {
355-
Write-Warning "No specfiles found in $Destination. Please ensure you have a .requires.json or .requires.psd1 file in the current directory, specify a path with -Path, or define specifications with the -Specification parameter to skip this search."
354+
Write-Warning "No specfiles found in $PWD. Please ensure you have a .requires.json or .requires.psd1 file in the current directory, specify a path with -Path, or define specifications with the -Specification parameter to skip this search."
356355
}
357356
foreach ($specfile in $specFiles) {
358357
Write-Verbose "Found Specfile $specFile. Evaluating..."

0 commit comments

Comments
 (0)