Open mouse07410 opened 4 months ago
Any progress, workaround, or feedback?
Hi, sorry for the late reply!
Two problems/differences between successful and unsuccessful invocations that I see is that the successful one (which I ran standalone, not via topgrade) did not specify the full path for the apps.
Topgrade does not specify the full path, it always searches commands in $PATH
.
What will happen if you simply do:
$ sudo tlmgr update --self --all
Does it also error out?
I saw that with the successful one, you were using sudo -EH
, why did you do this? I am aware that the sudo
on many Linux distros will modify $PATH
, but for macOS, this does not seem to be true from my test(I am on macOS 13, Sudo version 1.9.5p2).
Also, can you do:
$ which tlmgr
$ sudo zsh # replace zsh with your shell
$ which tlmgr
What will happen if you simply do:
$ sudo tlmgr update --self --all
Does it also error out?
No it doesn't - works correctly.
I saw that with the successful one, you were using
sudo -EH
, why did you do this?
To ensure the local env vars are set properly (as per my user profile, rather than root
).
for macOS, this does not seem to be true from my test(I am on macOS 13, Sudo version 1.9.5p2).
Don't know what to tell you - my Macs are on macOS 14 and 15, and -EH
works as expected (i.e., works - as opposed to being silently ignored).
No it doesn't - works correctly.
Ok then, -EH
is not needed.
Don't know what to tell you
I was trying to figure out if -EH
is needed.
Same as #903, I need a way to check if sudo
is needed.
No it doesn't - works correctly.
Ok then,
-EH
is not needed.Don't know what to tell you
I was trying to figure out if
-EH
is needed.
I think it is needed - but it's been quite a while ago, so I don't recall all the details. One thing for sure - sudo
is needed.
Same as #903, I need a way to check if
sudo
is needed.
In some cases it may not be needed. In my car it is necessary. The best would be showing the user to tell topgrade whether to employ sudo
here or not.
I just recalled that there are some 'use_sudo' confug entries in Topgrade that allows you to opt-in to sudo, maybe we can use this if it is just tedious and complicated to check if sudo is necessary.
That sounds good. My only other concern is that use_sudo
seems to be "global" rather than on per-command basis. I.e., I can't tell topgrade
to use it for poetry
but not for cargo
. IMHO, we need that option selected individually for several, off but for all.
Also, in another comment you mentioned Windows. Sorry, I've no clue about Win - only MacOS and Linux.
My only other concern is that use_sudo seems to be "global"
The existing use_sudo
s are per-step config entries, so no need to worry about this.
I don't seem to recall how to add use_sudo
to individual steps. And in the actual code that invokes, e.g., tlmgr
, I did not see anything resembling sudo - which is why I added my patch.
Could you please show how to add use_sudo
to a step? And whether they're a way to tell to use -EH
or not?
I guess you are talking about pre_sudo, which is indeed a global one. For pre-step configuration, check out this example: https://github.com/topgrade-rs/topgrade/blob/main/src%2Fsteps%2Fnode.rs#L95
Erroneous Behavior
Expected Behavior
Steps to reproduce
A bit hard, as this system is now running Privileged Access Module (doesn't just allow
sudo
based on/etc/sudoers
file).Possible Cause (Optional)
Two problems/differences between successful and unsuccessful invocations that I see is that the successful one (which I ran standalone, not via
topgrade
) did not specify the full path for the apps.Can you make an option to not specify full path? I think I understand the implications.
Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
I don't even know what that means.
Configuration file (Optional)
Additional Details
Operation System/Version: MacOS Sonoma 14.5 with Xcode-15.4 and stable Rust-1.79.
Installation: via
cargo install topgrade
Topgrade version:
Topgrade 15.0.0
Verbose Output (
topgrade -v
)Too verbose to paste (unless you want to go through a 3704 lines in a post), so here it is: topgr.out.txt