When I save a path to the inject variable (save it to the associated file) and then retrieve it, all the the slashes have been stripped.
How do you preserve the slashes when retrieving the injected path?
SciptZipPath: C:\agent\xml-data\build-dir\UT-RPER348-OB1\DBScripts_2023.16.23680.25.zip
when read back in:
C:agent xml-data build-dir UT-RPER348-JOB1DBScripts_2023.16.23680.25.zip
Here is how I am saving the variable in a script task:
$scriptZipPath = Join-Path -Path $bambooWorkingDirectory -ChildPath $archiveName;
$scriptInjectPath = "${bamboo.build.working.directory}\bamboo\archive.properties";
$propertiesFile = New-Item -Path $scriptInjectPath -ItemType "file" -Force;
Add-Content $propertiesFile "zipPath=$scriptZipPath";
Testing reading back in as follows:
Write-Host ${bamboo.inject.zipPath};