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

job.sh: avoid overriding environment/shell builtin #2186

Merged

Conversation

matthewrmshin
Copy link
Contributor

HOSTNAME was the main problem reported here. It is apparently a bash
built-in. To avoid local shell function variables from overriding the
environment or shell built-in, this change modifies all local shell
function variables to lower case. All other global shell and environment
variables should be protected by the CYLC_ prefix or by setting them
to their most usual values only if they are not set (e.g. using syntax
such as USER="${USER:-$(whoami)}").

Reported by @steoxley.

HOSTNAME was the main problem reported here. It is apparently a bash
builtin. To avoid local shell function variables from overriding the
environment or shell builtin, this change modifies all local shell
function variables to lower case. All other global shell and environment
variables should be protected by the `CYLC_` prefix or by setting them
to their most usual values only if they are not set (e.g. using syntax
such as `USER=${USER:-$(whoami)}`).
@matthewrmshin matthewrmshin added the bug Something is wrong :( label Mar 2, 2017
@matthewrmshin matthewrmshin added this to the next release milestone Mar 2, 2017
@matthewrmshin matthewrmshin self-assigned this Mar 2, 2017
@oliver-sanders oliver-sanders merged commit eea93d3 into cylc:master Mar 3, 2017
@matthewrmshin matthewrmshin deleted the fix-job-script-local-variable branch March 3, 2017 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants