Closed j0tt closed 8 years ago
what's the version of your shellscript task (_work/tasks ...) Also, what's the version of your agent?
Also what inputs (and exactly what values) are you specifying on the shellscript task?
@bryanmacfarlane the shellscript task is using 2.0.0. I just updated the agents, VSO says Agent.Version = 1.999.0 but I'm dubious that is correct. Is there a better place to verify that?
@ericsciple generalizing as best I can: Script Path: dir/dir/script.sh Working Directory: dir/dir/dir
Agent version is in package.json file in the root of the agent and it's reported as npm version in agent capabilities from the admin web UI.
We have at least 4 agents with this issue, all of varying Agent.NpmVersions (forgive me, I just inherited this environment): 0.5.9, 0.3.4, 0.2.28, 0.3.3
If the agent is updated, it should be 0.6.x
Trying to repro with 0.6.x
Okay, I knew I updated them... VSO is reporting the wrong versions under Agent.NpmVersion. Interrogating the package.jason file I see 0.6.5 on all agents.
OK. I got a repro and I have a fix.
If you want to confirm on your agent. _work/tasks/ShellScript/2.0.0/shellscript.js change line 21 from
if (!tl.filePathSupplied(cwd)) {
to
if (!tl.filePathSupplied('cwd')) {
It takes input name (not value) as the arg. The issue was masked in the case of picking the folder as cwd or root.
Awesome. Thanks for the quick turnaround!
np. sorry for the inconvenience.
I recently updated my agents only to find working directory does not appear to be working for my shell script tasks on my on-prem mac build agents.
Steps to reproduce: Create a build with a Shell Script task
Observe in the build output the working directory is the directory the script resides in, not the directory specified in the task.