Skip to content

Commit

Permalink
fix(local-build): fix when apbx already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jun 8, 2024
1 parent b00f6d2 commit 9fb62fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/local-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ if (!(Test-Path playbook.conf -PathType Leaf)) {
# check if old files are in use
$apbxFileName = "$fileName.apbx"
function GetNewName {
$num = 1
while (Test-Path -Path "$fileName ($num).apbx") {
while (Test-Path -Path $apbxFileName) {
$num++
$script:apbxFileName = "$fileName ($num).abpx"
}
Expand All @@ -52,7 +51,7 @@ if ($replaceOldPlaybook -and (Test-Path -Path $apbxFileName)) {
} elseif (Test-Path -Path $apbxFileName) {
GetNewName
}
$apbxPath = "$PWD\$fileName.apbx"
$apbxPath = "$PWD\$apbxFileName"

# make temp directories
$rootTemp = New-Item (Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $([System.Guid]::NewGuid())) -ItemType Directory -Force
Expand Down

0 comments on commit 9fb62fd

Please sign in to comment.