0

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.

2

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Dave, is there's any update? Let me know if you have any queries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.