Updated build path matching so updating get-pc actually works

This commit is contained in:
Zachary Gorman 2024-10-30 12:06:03 -07:00
parent 47e67a83d1
commit 0b3b809aa2

View file

@ -1,10 +1,12 @@
function Update-GetPC { function Update-GetPC {
if ($devStage -eq "Prod") { if ($devStage -eq "Prod") {
$GetPCSourcePath = $getPCProdBuildPath.TrimEnd('\Get-PC.psd1') $null = $getPCProdBuildPath -match '(.*)\\Get-PC.psd1'
$GetPCSourcePath = $Matches[1]
} }
elseif ($devStage -eq "Dev") { elseif ($devStage -eq "Dev") {
$GetPCSourcePath = $getPCDevBuildPath.TrimEnd('\Get-PC.psd1') $null = $getPCDevBuildPath -match '(.*)\\Get-PC.psd1'
$GetPCSourcePath = $Matches[1]
} }
$desinationPath = ($env:PSModulePath -split ';')[0] + "\Get-PC" $desinationPath = ($env:PSModulePath -split ';')[0] + "\Get-PC"