-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rework user commands to add to container commands #51
Conversation
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really have much to say here.
pyrex.py
Outdated
with open(shim, "w") as f: | ||
f.write( | ||
textwrap.dedent( | ||
"""\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this seems weird. Why is the opening line here indented even further than the others? I don't think the function requires that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't. black
indents the """
line but leaves the rest so sometimes the indentation gets off when I refactor things.
Adds test to validate that the TTY is correctly passed through to the container when stdout is a TTY
Defaults to 20.04 since that is the most recent sanity tested Ubuntu version
0601b81
OOps. I didn't realize this PR was tied to my master branch. Moved to PR #60 |
Reworks the way that commands specified by the user are wrapped by
Pyrex. Instead of completely replacing the container commands, the user
commands override and extend the container command defintions, taking
precedence over them (i.e. if the user excludes a command it will be
excluded even if the container includes it, and if the user includes it,
it will be included even if the container excludes it).
In order for this to work, the user command shims must be individually
written to execute the full path to the command inside the container,
since we don't know if it will be in $PATH.