首页 > 解决方案 > 在 Azure Devops 上附加到 PATH?

问题描述

我需要附加到 Azure Devops 管道上的 PATH 环境变量。我曾尝试运行脚本来执行此操作,但它不起作用:

- script: |
echo '##vso[task.setvariable variable=PATH]${PATH}:some/path/'

这无法设置路径,并且还会导致后续脚本失败,并显示以下内容:

##[error]Unable to locate executable file: 'bash'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

我需要做什么才能设置它?

标签: azure-devopscontinuous-integrationazure-pipelines-build-task

解决方案


为此有一个特殊的日志记录命令:

echo '##vso[task.prependpath]some\path'

在此处查看更多信息。


推荐阅读