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

Split --docker_run_args on white space #46

Merged
merged 1 commit into from
Jul 22, 2020
Merged

Conversation

eschnett
Copy link
Contributor

Split --docker_run_args on any white space (and not just single spaces). See https://docs.python.org/3.8/library/stdtypes.html#str.split for details.

This does not introduce spurious empty arguments when multiple spaces are used to separate docker run args (as in --volume a:b, with two spaces), and also ignores leading and trailing spaces (as in -v a:b). The latter should also help with the warning described in https://caliban.readthedocs.io/en/latest/recipes/local_dir.html, "[...] if you pass -v instead of --volume [...]" since it allows using -v if you add a space in front of it.

Split `--docker_run_args` on any white space (and not just single spaces). See <https://docs.python.org/3.8/library/stdtypes.html#str.split> for details.

This does not introduce spurious empty arguments when multiple spaces are used to separate docker run args (as in `--volume  a:b`, with two spaces), and also ignores leading and trailing spaces (as in ` -v a:b`). The latter should also help with the warning described in <https://caliban.readthedocs.io/en/latest/recipes/local_dir.html>, "[...] if you pass -v instead of --volume [...]" since it allows using `-v` if you add a space in front of it.
@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #46 into master will decrease coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
- Coverage   50.62%   50.44%   -0.18%     
==========================================
  Files          28       28              
  Lines        2894     2894              
==========================================
- Hits         1465     1460       -5     
- Misses       1429     1434       +5     
Impacted Files Coverage Δ
caliban/platform/gke/util.py 71.15% <0.00%> (-1.54%) ⬇️
caliban/platform/cloud/types.py 89.47% <0.00%> (-0.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f95b955...3d50379. Read the comment docs.

@sritchie
Copy link
Collaborator

@eschnett , thank you for this, this is excellent! Who'd have known... I'm glad to see this new trick.

I'll get this released shortly. Cheers!

@sritchie sritchie merged commit 0e3b471 into google:master Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants