print warning and resolve to absolute path for commands specified with relative path#320
Open
boegel wants to merge 6 commits into
Open
print warning and resolve to absolute path for commands specified with relative path#320boegel wants to merge 6 commits into
boegel wants to merge 6 commits into
Conversation
stdweird
reviewed
Oct 12, 2021
stdweird
reviewed
Oct 12, 2021
stdweird
reviewed
Oct 12, 2021
stdweird
reviewed
Oct 12, 2021
stdweird
reviewed
Oct 12, 2021
| SHELL = BASH | ||
|
|
||
|
|
||
| def ensure_cmd_abs_path(cmd): |
stdweird
reviewed
Oct 12, 2021
| self.log = getLogger(self._get_log_name()) | ||
|
|
||
| self.cmd = cmd # actual command | ||
| self.cmd = ensure_cmd_abs_path(cmd) # actual command |
Member
There was a problem hiding this comment.
allow path as kwargs (call it command_path to avoid any conflict with other)
Member
Author
|
Tests fail on: That's a special case I haven't taken into account yet, indeed: the command to run is not necessarily the first string value, there may be environment stuff in front of it... Oh boy. @stdweird Any suggestions come to mind on how to handle this edge case? |
Member
|
Split on |
Member
|
@boegel solution is to only set absolute path when no shell is being used. in a shell, the shell will do this anyway |
Contributor
|
@boegel is this still needed? tbh, now we went py3 only I would suggest using pathlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.