-
Notifications
You must be signed in to change notification settings - Fork 22
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
Complex shell quote escaping fails #39
Comments
bricoletc
added a commit
to bricoletc/lsf
that referenced
this issue
Mar 7, 2021
* The split argument string needs to be rejoined using `shlex` * Two unit tests for `lsf_config.py` to ensure quotes are shell-escaped * One modified unit test for `lsf_submit.py` to ensure quotes are shell-escaped * Rewrote `__init__` of `Config` object, to directly concatenate parameter lists. Makes downstream argument string production simpler to read. * Added function docstrings in `lsf_config.py` to make understanding easier
bricoletc
added a commit
to bricoletc/lsf
that referenced
this issue
Mar 7, 2021
* Add vim and ven to gitignore * Add Snakemake-Profiles#39 solving to changelog * Add example of complex quote escaping in readme
bricoletc
added a commit
to bricoletc/lsf
that referenced
this issue
Mar 7, 2021
* Add vim and ven to gitignore * Add Snakemake-Profiles#39 solving to changelog * Add example of complex quote escaping in readme
mbhall88
pushed a commit
that referenced
this issue
Mar 12, 2021
* The split argument string needs to be rejoined using `shlex` * Two unit tests for `lsf_config.py` to ensure quotes are shell-escaped * One modified unit test for `lsf_submit.py` to ensure quotes are shell-escaped * Rewrote `__init__` of `Config` object, to directly concatenate parameter lists. Makes downstream argument string production simpler to read. * Added function docstrings in `lsf_config.py` to make understanding easier
mbhall88
pushed a commit
that referenced
this issue
Mar 12, 2021
* Add vim and ven to gitignore * Add #39 solving to changelog * Add example of complex quote escaping in readme
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I was trying to instruct snakemake to ignore a specific lsf host which is faulty, so wrote this in my
lsf.yaml
:(This gets parsed as
{'__default__': ['-R "select[hname!=\'hl-codon-32-02\']"']}
by pyyaml)The reason I do this is that if the hostname to ignore has special characters, the shell command needs to look like
-R "select[hname!='hname']"
(see IBM docs :If you need to include a hyphen (-) or other non-alphabetic characters within the string, enclose the text in single quotation marks, for example, bsub -R "select[hname!='host06-x12']"
)However this gets passed at submission time as
-R select[hname!='hl-codon-32-02']
but lsf cannot submit that (trybsub -Is -R select[hname!='hl-codon-32-02'] bash
for eg)Pfew- long story short, I have found a simple solution to this, and putting in a PR with unit tests.
The text was updated successfully, but these errors were encountered: