Dave Michaels
Dave Michaels

Reputation: 937

Install program on custom build agent azure devops

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.

Upvotes: 0

Views: 579

Answers (1)

wade zhou - MSFT
wade zhou - MSFT

Reputation: 8082

As per the error message, you are running sed in powershell task.

  1. Please change to use Bash task as it's a unix based command.
  2. 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, run sed --version locally, 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.

My local command: enter image description here

My pipeline with bash task: enter image description here

Upvotes: 1

Related Questions