-
Notifications
You must be signed in to change notification settings - Fork 2k
Replace menuinst subprocessing by ctypes win elevation #7426
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
conda/common/os/windows.py
Outdated
| """ | ||
| code = None | ||
| if _ctypes: | ||
| params = " ".join(['"%s"' % (x, ) for x in cmd_line[1:]]) |
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.
This line looks off to me. Is it really ok to quote every single parameter? And why the single-value tuple for the string interpolation?
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.
Is it really ok to quote every single parameter?
Well we could do it more conditionally based on the contents, but I think it is ok.
And why the single-value tuple for the string interpolation?
No real reason!
|
|
@kalefranz not sure about the error, as I have not change any code related to that. Could you test on your VM? |
kalefranz
left a comment
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.
Looking good so far!
| for_user = False | ||
|
|
||
| anaconda_prompt = on_win and args.anaconda_prompt | ||
| anaconda_prompt = on_win # TODO: probably remove and leave --anaconda-prompt as a flag |
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 must have put that in just for debug or something 😳
| stdin = json.dumps(plan) | ||
| result = subprocess_call( | ||
| 'sudo %s -m conda.initialize' % sys.executable, | ||
| 'sudo %s -m conda.core.initialize' % sys.executable, |
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.
No wonder it wasn't working!
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.
yep I told you it was a silly bug 🤣
|
@kalefranz :-p |
|
I added a merge commit to this PR to merge in master. Want to see the tests run. |
Signed-off-by: Kale Franz <kfranz@continuum.io>
|
@kalefranz tests pass now. This is ready AFAICT |
|
Was there anything else you wanted to do here? Didn't you want to try to finish something out that you sort of started thinking through? Is that done, or not as high priority now? I don't remember exactly what that was... |
|
I could not make it work ( reattach the elevated process to the current condole to view anyboutput) |
kalefranz
left a comment
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.
LGTM
|
Hi there, thank you for your contribution to Conda! This pull request has been automatically locked since it has not had recent activity after it was closed. Please open a new issue or pull request if needed. |
No description provided.