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

flux -V: small fix to allow it to work outside of an instance #2426

Merged
merged 2 commits into from Sep 30, 2019

Conversation

@garlick
Copy link
Member

commented Sep 30, 2019

When flux -V re-execs flux version, it doesn't find flux unless PATH includes it. For example, itt fails when run as ./flux -V in a build tree, outside of a running instance.

Per suggestion from @grondo, exec the original argv[0] rather than "flux".

Update sharness test to reset the PATH in addition to FLUX_URI, and run flux -V using its builddir path.

garlick added 2 commits Sep 30, 2019
Problem: flux -V fails if run outside of an instance,
e.g. as ./flux -V, where the cwd is not in PATH.

Re-exec with the original argv[0] instead of "flux"
so that the same executable is invoked.
@codecov-io

This comment has been minimized.

Copy link

commented Sep 30, 2019

Codecov Report

Merging #2426 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2426      +/-   ##
==========================================
- Coverage   81.12%   81.12%   -0.01%     
==========================================
  Files         225      225              
  Lines       36102    36102              
==========================================
- Hits        29289    29288       -1     
- Misses       6813     6814       +1
Impacted Files Coverage Δ
src/cmd/flux.c 83.16% <100%> (ø) ⬆️
src/common/libsubprocess/local.c 79.86% <0%> (-0.35%) ⬇️
src/shell/shell.c 85.75% <0%> (-0.27%) ⬇️
src/cmd/flux-module.c 84.19% <0%> (ø) ⬆️
src/common/libflux/message.c 80.36% <0%> (+0.13%) ⬆️
@grondo

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

Good catch @garlick! Sorry you had to fix up my big boo-boo.

@grondo grondo merged commit c8f28ed into flux-framework:master Sep 30, 2019
4 checks passed
4 checks passed
Summary 1 potential rule
Details
codecov/patch 100% of diff hit (target 81.12%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +18.87% compared to 5ded3e7
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@garlick garlick referenced this pull request Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.