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

Rework user commands to add to container commands #51

Closed
wants to merge 2 commits into from

Conversation

JoshuaWatt
Copy link
Collaborator

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.

kergoth
kergoth previously approved these changes Sep 22, 2020
@kergoth
Copy link
Contributor

kergoth commented Sep 22, 2020

Thanks!

Copy link
Contributor

@matthoosier-garmin matthoosier-garmin left a 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(
"""\
Copy link
Contributor

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.

Copy link
Collaborator Author

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
@JoshuaWatt
Copy link
Collaborator Author

OOps. I didn't realize this PR was tied to my master branch. Moved to PR #60

@JoshuaWatt JoshuaWatt closed this May 3, 2021
@JoshuaWatt JoshuaWatt mentioned this pull request May 3, 2021
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

3 participants