Issue Summary
PowerShell script task fails when using single quotes in arguments after the Bamboo 10.2.2 upgrade.
Steps to Reproduce
- Link the repository and create a Plan.
- Add a Job with two tasks:
- Task 1: Checkout
- Checkout repo into a defined working directory (e.g., test).
- Task 2: Script Task
- Interpreter: Windows PowerShell
- Script Location: File
- Script file: script1.ps1
- Arguments: -ScriptPath '.\script2'
- Working Subdirectory: Same as the checkout directory
- Run the Plan
Expected Results
The task should execute without any errors
Actual Results
The build is failing with the below error in the build logs:
error 01-Apr-2025 07:44:19 C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PROJ-BAN2-JOB1\test\script1.ps1 : Script not found at path: error 01-Apr-2025 07:44:19 ''.\script2.ps1'' error 01-Apr-2025 07:44:19 + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException error 01-Apr-2025 07:44:19 + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,run.ps1 error 01-Apr-2025 07:44:19
Workaround
Replace the single quotes with double quotes.