I was getting below error on using a self hosted windows 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. Also verify the file has a valid extension for an executable file.
Here is my pipeline - Goal of task was to get the filename
alone from the whole filePath
and to use this filename
in further tasks.
trigger:
- master
parameters:
project: './test/abc/UnitTest.proj'
pool: self-hosted-windows
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: |
input="${Parameters.project}"
file_name_with_ext="${input##*/}"
file_only="${file_name%.*}"
echo "File : $file_only"
/
in path. – F. Hauri