Skip to content

Commit

Permalink
TS-31191 fix null check in powershell script
Browse files Browse the repository at this point in the history
  • Loading branch information
jveihelmann committed Dec 12, 2023
1 parent 92c822f commit 2f84cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TeamscaleEmbeddedResourceUpdater/TeamscaleResourceUpdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Update-ResxFile {
$dataNode.InnerXml = "<value>$value</value>"

# Add or update the 'Project' property
if ($project -ne $null) {
if ($project) {

$projectNode = $resxXml.SelectSingleNode("/root/data[@name='Project']")
if ($projectNode -eq $null) {
Expand All @@ -69,7 +69,7 @@ if ($revision) {

# Update the .resx file
Update-ResxFile -resxPath $path -key $key -value $value -project $project
if ($project -eq $null){
if (-not $project){
Write-Host "Updated Teamscale Resource with $($key): $($value)"
} else {
Write-Host "Updated Teamscale Resource with $($key): $($value) and $($project)"
Expand Down

0 comments on commit 2f84cd1

Please sign in to comment.