Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell Script step fails with OSX build agent "Input required: cwd" #1227

Closed
dylanberry opened this issue Feb 12, 2016 · 10 comments
Closed

Shell Script step fails with OSX build agent "Input required: cwd" #1227

dylanberry opened this issue Feb 12, 2016 · 10 comments
Assignees

Comments

@dylanberry
Copy link

I'm having an issue with a bash shell script failing on my OSX build agent. Here are the logs:

##[Debug] 2016-02-12T01:52:48.004Z: scriptPath: /Users/burstingsilver/myagent/_work/2/s/tools/BuildUtilites/Set-iOSVersionNumber.sh
##[Debug] 2016-02-12T01:52:48.005Z: 
##[Debug] 2016-02-12T01:52:48.005Z: args: 
##[Debug] 2016-02-12T01:52:48.005Z: cwd: 
##[Debug] 2016-02-12T01:52:48.005Z: failOnStandardError: false
##[Debug] 2016-02-12T01:52:48.005Z: 
##[Debug] 2016-02-12T01:52:48.009Z: cwd: /Users/burstingsilver/myagent/_work/2/s
##[Debug] 2016-02-12T01:52:48.148Z: check path : /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/task.json
##[Debug] 2016-02-12T01:52:48.149Z: set resource file to: /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/task.json
##[Debug] 2016-02-12T01:52:48.149Z: system.culture=en-US
##[Debug] 2016-02-12T01:52:48.149Z: load strings from: /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/task.json
##[Debug] 2016-02-12T01:52:48.149Z: load loc strings from: /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/strings/resources.resjson/en-US/resources.resjson
##[Debug] 2016-02-12T01:52:48.150Z: check path : /bin/bash
##[Debug] 2016-02-12T01:52:48.151Z: bash=/bin/bash
##[Debug] 2016-02-12T01:52:48.151Z: load strings from: /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/node_modules/vsts-task-lib/lib.json
##[Debug] 2016-02-12T01:52:48.151Z: load loc strings from: /Users/burstingsilver/myagent/_work/tasks/ShellScript/1.0.15/node_modules/vsts-task-lib/strings/resources.resjson/en-US/resources.resjson
##[Debug] 2016-02-12T01:52:48.152Z: task result: Failed
##[Error] 2016-02-12T01:52:48.156Z: Input required: cwd
##[Error] 2016-02-12T01:52:48.156Z: 

I am absolutely clueless on how to resolve this issue. My script takes no arguments. Can someone help?

@ericsciple
Copy link
Contributor

As a workaround, can you try setting the task input Working Directory under the advanced section for the task inputs.

@dylanberry
Copy link
Author

Thanks, that's helpful!

@ericsciple
Copy link
Contributor

Did that workaround your issue? If so, it sounds like something broke for this task running on an xplat agent. I couldn't repro the issue on a Windows agent.

@bryanmacfarlane
Copy link
Contributor

I'll investigate ...

@bryanmacfarlane bryanmacfarlane self-assigned this Feb 12, 2016
@dylanberry
Copy link
Author

Yeah, the workaround allows the bash script to run without issue.

@rusty21
Copy link

rusty21 commented Mar 28, 2016

I just experienced the same issue as Dylan. The work around solved the problem from me as well.

@bryanmacfarlane
Copy link
Contributor

I'll fix this today - fell off my radar

@bryanmacfarlane
Copy link
Contributor

This is fixed in the sprint that will roll out in the next couple of weeks

@akshaysaviant
Copy link

I am getting below error while building in VSTS

2017-10-01T17:47:53.6039080Z ##[debug]Evaluating condition for step: 'Transform deploy.yaml'
2017-10-01T17:47:53.6060950Z ##[debug]Evaluating: succeeded()
2017-10-01T17:47:53.6079460Z ##[debug]Evaluating succeeded:
2017-10-01T17:47:53.6105680Z ##[debug]=> (Boolean) True
2017-10-01T17:47:53.6125390Z ##[debug]Expanded: True
2017-10-01T17:47:53.6146430Z ##[debug]Result: True
2017-10-01T17:47:53.6164880Z ##[section]Starting: Transform deploy.yaml
2017-10-01T17:47:53.6226700Z ==============================================================================
2017-10-01T17:47:53.6245790Z Task : Command Line
2017-10-01T17:47:53.6261440Z Description : Run a command line with arguments
2017-10-01T17:47:53.6274170Z Version : 1.1.3
2017-10-01T17:47:53.6286310Z Author : Microsoft Corporation
2017-10-01T17:47:53.6299210Z Help : More Information
2017-10-01T17:47:53.6312250Z ==============================================================================
2017-10-01T17:47:53.8964120Z ##[debug]agent.workFolder=/opt/vsts/work
2017-10-01T17:47:53.8992840Z ##[debug]loading inputs and endpoints
2017-10-01T17:47:53.9023580Z ##[debug]loading INPUT_FILENAME
2017-10-01T17:47:53.9045180Z ##[debug]loading INPUT_ARGUMENTS
2017-10-01T17:47:53.9069790Z ##[debug]loading INPUT_WORKINGFOLDER
2017-10-01T17:47:53.9093410Z ##[debug]loading INPUT_FAILONSTANDARDERROR
2017-10-01T17:47:53.9117040Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2017-10-01T17:47:53.9139960Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2017-10-01T17:47:53.9162780Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2017-10-01T17:47:53.9187770Z ##[debug]loading SECRET_CONTAINER_USERNAME
2017-10-01T17:47:53.9210390Z ##[debug]loading SECRET_CONTAINER_PASSWORD
2017-10-01T17:47:53.9231730Z ##[debug]loaded 9
2017-10-01T17:47:53.9258970Z ##[debug]check path : /opt/vsts/work/_tasks/CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9/1.1.3/task.json
2017-10-01T17:47:53.9328990Z ##[debug]set resource file to: /opt/vsts/work/_tasks/CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9/1.1.3/task.json
2017-10-01T17:47:53.9358080Z ##[debug]system.culture=en-US
2017-10-01T17:47:53.9384230Z ##[debug]filename=bash
2017-10-01T17:47:53.9407200Z ##[debug]check path : /bin/bash
2017-10-01T17:47:53.9431470Z ##[debug]bash=/bin/bash
2017-10-01T17:47:53.9455140Z ##[debug]workingFolder=/opt/vsts/work/1/s
2017-10-01T17:47:53.9481670Z ##[debug]testing directory '/opt/vsts/work/1/s'
2017-10-01T17:47:53.9509520Z ##[debug]arguments=-c "sed -i ‘s/$BUILD_ID/22/; s/$ACR_DNS/saviantkubernetespoc.azurecr.io/’ deploy.yaml"
2017-10-01T17:47:53.9537120Z ##[debug]/bin/bash arg: -c "sed -i ‘s/$BUILD_ID/22/; s/$ACR_DNS/saviantkubernetespoc.azurecr.io/’ deploy.yaml"
2017-10-01T17:47:53.9563440Z ##[debug]failOnStandardError=false
2017-10-01T17:47:53.9586240Z ##[debug]exec tool: /bin/bash
2017-10-01T17:47:53.9607470Z ##[debug]Arguments:
2017-10-01T17:47:53.9631750Z ##[debug] -c
2017-10-01T17:47:53.9657510Z ##[debug] sed -i ‘s/$BUILD_ID/22/; s/$ACR_DNS/saviantkubernetespoc.azurecr.io/’ deploy.yaml
2017-10-01T17:47:53.9676680Z [command]/bin/bash -c sed -i ‘s/$BUILD_ID/22/; s/$ACR_DNS/saviantkubernetespoc.azurecr.io/’ deploy.yaml
2017-10-01T17:47:53.9695610Z sed: -e expression #1, char 1: unknown command: `�'
2017-10-01T17:47:53.9714010Z /bin/bash: s//saviantkubernetespoc.azurecr.io/’: No such file or directory
2017-10-01T17:47:53.9737360Z ##[debug]rc:127
2017-10-01T17:47:53.9759280Z ##[debug]success:false
2017-10-01T17:47:53.9856820Z ##[error]/bin/bash failed with return code: 127
2017-10-01T17:47:53.9870490Z ##[debug]Processed: ##vso[task.issue type=error;]/bin/bash failed with return code: 127
2017-10-01T17:47:53.9893290Z ##[debug]task result: Failed
2017-10-01T17:47:53.9931920Z ##[error]/bin/bash failed with error: /bin/bash failed with return code: 127
2017-10-01T17:47:53.9945150Z ##[debug]Processed: ##vso[task.issue type=error;]/bin/bash failed with error: /bin/bash failed with return code: 127
2017-10-01T17:47:53.9980210Z ##[debug]Processed: ##vso[task.complete result=Failed;]/bin/bash failed with error: /bin/bash failed with return code: 127
2017-10-01T17:47:54.0007170Z ##[section]Finishing: Transform deploy.yaml

Can anyone help me?

@nodeselector
Copy link

FYI, this still happens:

##[section]Starting: AzureCLI
==============================================================================
Task         : Azure CLI
Description  : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerSheell Core/Batch script when running on Windows agent.
Version      : 2.0.3
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
==============================================================================
[command]/usr/local/bin/az --version
WARNING: You have 2 updates available. Consider updating your CLI installation.
azure-cli                         2.0.75 *

command-modules-nspkg              2.0.3
core                              2.0.75 *
nspkg                              3.0.4
telemetry                          1.0.4

Python location '/usr/local/Cellar/azure-cli/2.0.75/libexec/bin/python'
Extensions directory '/Users/runner/.azure/cliextensions'

Python (Darwin) 3.7.5 (default, Nov  1 2019, 02:16:32) 
[Clang 11.0.0 (clang-1100.0.33.8)]

Legal docs and information: aka.ms/AzureCliLegal


Setting AZURE_CONFIG_DIR env variable to: /Users/runner/runners/2.160.0/work/_temp/.azclitask
##[error]Script failed with error: Error: Input required: connectedServiceNameARM
##[section]Finishing: AzureCLI

The workarounds don't seem to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants