Skip to content

Conversation

boegel
Copy link
Member

@boegel boegel commented Oct 12, 2021

No description provided.

SHELL = BASH


def ensure_cmd_abs_path(cmd):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow to pass path to which

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 919b9ec

self.log = getLogger(self._get_log_name())

self.cmd = cmd # actual command
self.cmd = ensure_cmd_abs_path(cmd) # actual command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow path as kwargs (call it command_path to avoid any conflict with other)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 919b9ec

@boegel
Copy link
Member Author

boegel commented Oct 12, 2021

Tests fail on:

OSError: Command PYTHONPATH="..." not found in $PATH!

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?

@itkovian
Copy link
Member

Split on and drop everything that matches a [a-z0-9A-Z_]+=[^ ]+ at the start of the list?

@stdweird
Copy link
Member

@boegel solution is to only set absolute path when no shell is being used. in a shell, the shell will do this anyway

@wdpypere
Copy link
Contributor

wdpypere commented Mar 7, 2023

@boegel is this still needed? tbh, now we went py3 only I would suggest using pathlib is_absolute() but it seems this was never implemented?

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.

4 participants