diff --git a/Get-PC/Private/Update-GetPC.ps1 b/Get-PC/Private/Update-GetPC.ps1 index b85d3f0..4a06cf6 100644 --- a/Get-PC/Private/Update-GetPC.ps1 +++ b/Get-PC/Private/Update-GetPC.ps1 @@ -1,10 +1,12 @@ function Update-GetPC { if ($devStage -eq "Prod") { - $GetPCSourcePath = $getPCProdBuildPath.TrimEnd('\Get-PC.psd1') + $null = $getPCProdBuildPath -match '(.*)\\Get-PC.psd1' + $GetPCSourcePath = $Matches[1] } 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"