Merge lp:~percona-toolkit-dev/percona-toolkit/pt-stalk-fails-to-start-if-HOME-environment-variable-is-not-set-1266869 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13
Proposed by
Frank Cizmich
Status: | Merged |
---|---|
Approved by: | Daniel Nichter |
Approved revision: | 613 |
Merged at revision: | 616 |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/pt-stalk-fails-to-start-if-HOME-environment-variable-is-not-set-1266869 |
Merge into: | lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13 |
Diff against target: |
159 lines (+47/-9) 9 files modified
bin/pt-ioprofile (+4/-1) bin/pt-mext (+4/-1) bin/pt-mysql-summary (+4/-1) bin/pt-pmp (+4/-1) bin/pt-sift (+4/-1) bin/pt-stalk (+4/-1) bin/pt-summary (+4/-1) lib/bash/parse_options.sh (+5/-1) t/lib/bash/parse_options.sh (+14/-1) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-stalk-fails-to-start-if-HOME-environment-variable-is-not-set-1266869 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Pending | ||
Review via email: mp+246351@code.launchpad.net |
This proposal supersedes a proposal from 2014-12-19.
Description of the change
Problem:
If $HOME is not set shell tools fail when trying to find config files.
This is a problem for users who want to start tools from init (e.g. pt-stalk)
Solution:
Allowed undefined variables for that line of code in parse_options.sh
Synced with rest of tools.
To post a comment you must log in.
This approach is too blunt. set -u was a specific design decision for this libs to force good code and avoid weird problems with undefined vars. If $HOME is the only consideration, can you conditionalize the call? I.e. if HOME is set, call it one way; if not set, call it another way?