简体   繁体   中英

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

I go the following error while print group variable in azure DevOps both yaml and classic using MS hosted agent

##[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. 

The yml code below

trigger:
- master

variables:
- group: myvargroup

pool:
  vmImage: ubuntu-latest

stages:
  - stage: "Test"
    jobs:
      - job: 
        steps:
        - script: echo $(fname)
          displayName: 'Run a one-line script'

The job parameter below enter image description here

Error screenshot enter image description here

I tested your sample, it works well now. There is a recently event of availability degradation of Azure DevOps, which could affected these services, and it has been resolved. If you want to know more information, please click here . You can try again to see if the problem still exists.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM