From 0b3b809aa266d01aa8e4227645bd5be2e0151454 Mon Sep 17 00:00:00 2001 From: Zachary Gorman Date: Wed, 30 Oct 2024 12:06:03 -0700 Subject: [PATCH] Updated build path matching so updating get-pc actually works --- Get-PC/Private/Update-GetPC.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"