-
Notifications
You must be signed in to change notification settings - Fork 312
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 self update #816
Fix self update #816
Conversation
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #816 +/- ##
==========================================
- Coverage 52.73% 52.52% -0.21%
==========================================
Files 262 262
Lines 18965 18971 +6
==========================================
- Hits 10001 9965 -36
- Misses 7404 7447 +43
+ Partials 1560 1559 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@lucklove merge failed. |
Signed-off-by: lucklove <gnu.crazier@gmail.com>
…to fix-self-update
Signed-off-by: lucklove <gnu.crazier@gmail.com>
Signed-off-by: lucklove gnu.crazier@gmail.com
What problem does this PR solve?
The code in the master branch will get the
tiup
binary lost after executiontiup update --self
:This is because we treat
tiup
as a normal component and install it to~/.tiup/components/tiup/{version}/
in SelfUpdate and once it's installedSelfUpdate
will return nil and the oldtiup
binary will be remove from ~/.tup/bin.In a word, it should be installed to "
/.tiup/bin" instead of "/.tiup/components/tiup/{version}/"What is changed and how it works?
Read the
TargetDir
field ofComponentSpec
, if it's not empty, install component to where it's specified.Check List
Tests
Related changes
Release notes: