Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not drop environment variables that contain '=' in their value, or have no value. #97

Merged
merged 3 commits into from
May 2, 2021
Merged

Conversation

AlanUnderwood
Copy link
Contributor

I noticed whilst doing a little home project that this plugin will not pass environment variables to the java application from a script file if the environment variable in the script file has an '=' character in it. It silently ignores them.

This change will read environment variables that contain '=' characters and add them to the Java application's environment.
It will also include environment variables whose value is empty.
Finally, it will log a warning for any environment variables that are dropped, though I don't think it would ever happen because the 'env' command will always return
VAR=VAL
or
VAR=

@rmcuenen
Copy link

Is this ever going to be fixed in a release?
I actually need the first part of this issue:
VAR="VAL -ARG1=VAL1 -ARG2=VAL2"

@AlanUnderwood
Copy link
Contributor Author

Any chance someone with the power could trigger this build again. I think the build failure was down to the build system at the time, not the code changes.

@dmatej
Copy link
Member

dmatej commented Sep 9, 2020

Could you rebase it to current master? It uses old JDK versions, build passed on Oracle JDK8, but failed on JDK7. I see newer builds use OpenJDK.

@AlanUnderwood
Copy link
Contributor Author

@dmatej PR branch rebased and everything seems to be working and tests passing. 😃

@AlanUnderwood
Copy link
Contributor Author

Bump! Could this be merged please.

@AlanUnderwood
Copy link
Contributor Author

@pzygielo @dmatej
Could this please be reviewed and merged.

@dmatej dmatej merged commit dec361d into mojohaus:master May 2, 2021
@AlanUnderwood
Copy link
Contributor Author

@dmatej Thanks! 🥳

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

Successfully merging this pull request may close these issues.

5 participants