Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

azure-pipelines.yml will fail for multi-line commit messages #3

Open
lsoethout opened this issue Jun 15, 2022 · 1 comment
Open

azure-pipelines.yml will fail for multi-line commit messages #3

lsoethout opened this issue Jun 15, 2022 · 1 comment

Comments

@lsoethout
Copy link

When running an Azure DevOps pipeline that calls azure-pipelines.yml by a manual trigger after a commit has been done through a Pull Request, the environment variable BUILD_SOURCEVERSIONMESSAGE will likely contain a multi-line text with one or more whitespace characters (the description of the commit).

This will lead to additional lines in file env.list that will be interpreted by docker as additional environment variables. This leads to the following error message, ending the pipeline process:

docker: poorly formatted environment: variable 'Second line of commit description.' contains whitespaces.
See 'docker run --help'.
##[debug]Exit code 125 received from tool '/usr/bin/bash'
##[debug]STDIO streams have closed for tool '/usr/bin/bash'
##[error]Bash exited with code '125'.

This can be prevented by adding a line of code that removes the problematic environment variable:
unset BUILD_SOURCEVERSIONMESSAGE
before storing the environment into env.list.

@esp0
Copy link

esp0 commented May 22, 2023

Will this be fixed @viktigpetterr ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants