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

Allow podman exec with --interactive and no --tty #583

Conversation

jhc4318
Copy link
Contributor

@jhc4318 jhc4318 commented May 1, 2024

An interactive container does not need to have a TTY. There's a slight difference in behaviour that is currently a blocker for my use case.

>podman exec -i ctr_name /bin/bash -c 'hi' 1> 1.txt 2> 2.txt
>cat 1.txt
>cat 2.txt
/bin/bash: hi: command not found

>podman exec -it ctr_name /bin/bash -c 'hi' 1> 1.txt 2> 2.txt
>cat 1.txt 
/bin/bash: hi: command not found
>cat 2.txt 

I've added a testcase for the --interactive only case however stdout/stderr isn't captured by PoW in the -it case so no test has been added there (this also does not affect the existing behaviour there anyway).

@jhc4318 jhc4318 marked this pull request as ready for review May 1, 2024 13:33
Copy link
Owner

@gabrieldemarmiesse gabrieldemarmiesse left a comment

Choose a reason for hiding this comment

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

Many thanks for the pull request and sorry for the delay. This PR is short, has a clear explanation and a unit test. All the good stuff :) PRs like this make my day!

@gabrieldemarmiesse gabrieldemarmiesse merged commit 1c154c9 into gabrieldemarmiesse:master May 13, 2024
35 checks passed
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.

2 participants