-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(oh-my-zsh): fix remote oh-my-zsh issue #496
Conversation
Codecov Report
@@ Coverage Diff @@
## master #496 +/- ##
=========================================
- Coverage 3.50% 3.35% -0.16%
=========================================
Files 27 31 +4
Lines 3141 4208 +1067
=========================================
+ Hits 110 141 +31
- Misses 3031 4067 +1036
|
Friendly ping the guys in #477 @Auravendill @loehden @leoheck @ahuston-0 Here is a build for
https://github.com/SteveLauC/topgrade/releases/tag/oh-my-zsh-remote |
Is it okay to run the musl-Version on GNU/Linux (Debian)? |
IMHO, yes. Actually, I build it for |
Unfortunately, I will not be able to test it, since my remote is ARM. |
Sorry, I don't have an arm-based machine at hand:( |
Give me a bit and I can get back, my topgrade setup is all x86 stuff |
Standards checklist:
CONTRIBUTING.md
cargo build
)cargo fmt
)cargo clippy
)cargo test
)If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.
Closes #477
Root cause of that issue
See this comment
Solution
We judge if we are running under
ssh
through environment variablesSSH_CLIENT
andSSH_TTY
, if yes, we spawn azsh
process and makezshrc
sourced, then we extract the environment variableZSH
from this process, and set it in thetopgrade
process.Fixed issues
oh-my-zsh
installation (not~/.oh-my-zsh
) on a remote machine and the user tries to updateoh-my-zsh
on that remote machine through topgrade, then this step will be skipped as environment variableZSH
is absent and the hardcoded fallback path (~/.oh-my-zsh
) does not exist. This is pretty similar to [oh-my-zsh]$ZSH
should be used to compose its install directory #426 but on a remote machine, this patch also fixes it.