-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Allow conda init --dev
to output to either fd or tmp
#11865
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
Conversation
9898bdf
to
f1de5fb
Compare
f1de5fb
to
f5b15f6
Compare
f5b15f6
to
ee85700
Compare
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.
Thank you for that refactor!
ee85700
to
67da1fb
Compare
08e3349
to
d041d9e
Compare
pre-commit.ci autofix |
542db30
to
e63d77f
Compare
dev_piping_group = p.add_mutually_exclusive_group() | ||
dev_piping_group.add_argument( | ||
"--fd", | ||
type=int, | ||
help="When --dev is specified use --fd to pipe to a file descriptor besides stdout.", | ||
default=None, | ||
) | ||
dev_piping_group.add_argument( | ||
"--tmp", | ||
type=Path, | ||
help="When --dev is specified use --tmp to write to a temporary file instead of stdout.", | ||
default=None, | ||
) |
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.
Defining a mutex group where all of the args are SUPPRESS
-ed breaks sphinx (but including help blurbs is better anyhow; less magic)...
fe4c7b5
to
fc2f891
Compare
dc61689
to
16497fe
Compare
16497fe
to
b5de921
Compare
f6fee9e
to
5e31b78
Compare
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 noticed there's a lot of uncovered lines. Is there a way for to test this even if we have to use something like subprocess.Popen
? I would feel a little better about this pull request if we could bump up the test coverage.
I'll be happy to be persuaded otherwise though if this represents too big of a burden.
5e31b78
to
22b9bc0
Compare
22b9bc0
to
729bad4
Compare
this was a valuable learning and research effort but is unlikely to proceed in the current form |
Description
Expose controlling where
conda init --dev
is output. There are three ways to output:--fd 3
), or--tmp $TMPDIR/conda-init-dev.$$.$RANDOM
)This way, the shell interface can choose how to receive the initialization script (as opposed to being told how it must receive it).
Depends on #11862
Checklist - did you ...
news
directory (using the template) for the next release's release notes?Add / update necessary tests?Add / update outdated documentation?