I have downloaded a custom build agent for an Azure Devops release pipeline. I am trying to execute a sed statement within the release pipeline, but I am getting an error that the term sed is not recognized as the name of a cmdlet, function, script file, or operable program. Any advice on how I can get sed installed in a custom build agent would be appreciated.
1 Answer
As per the error message, you are running sed in powershell task.
- Please change to use Bash task as it's a unix based command.
- Since you're using self-hosted agent, please make sure you have installed
mingw(you can install git for windows(git bash) which include mingw) on windows machine, runsed --versionlocally, make sure it can run successfully. Follow link to add "C:\Program Files\Git\bin" to the Path of Environment Variables, then restart the agent service. You can invoke bash in pipeline now.
1 Comment
wade zhou - MSFT
Hi Dave, is there's any update? Let me know if you have any queries.


sedis a Unix command. You need to specify to runsedwith bash/Unix.