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
Ask if a different version of a pkg should be installed when theres an existing installation #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
==========================================
- Coverage 47.6% 40.16% -7.45%
==========================================
Files 12 13 +1
Lines 439 717 +278
==========================================
+ Hits 209 288 +79
- Misses 211 405 +194
- Partials 19 24 +5
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.
Please update the messages and try to provide the list of changes to be added/removed when updating a package
Thanks for your contribution though, this feature is pretty nice, just need a bit more polishing to be amazing! |
@tjamet I've made some changes and have replied with questions I could use your opinion about. I have another feature branched off of this one that I'd like to submit if we get this merged. In case you're curious, the other feature is an option to automatically detect the path to an executable file in the given image and set the entrypoint. This seems like a nice feature so that public images can be used more easily. I've been using it to switch versions of golang and ruby locally when i need to. When developing this I referred to #20 for ideas. https://github.com/terev/whalebrew/tree/detect-entrypoint |
@bfirsh looking for another review on this one if someone has time |
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.
Thanks for the contribution
There are some nits we can address here or in a different PR
@tjamet is there a discord group or something where we could talk about the project? I have a few questions |
there is no discord group so far, shall you send the questions by email? |
@tjamet I've modified the output provided when there's changes to an existing installation of a package. I've also added the functionality to only ask the user about permission changes when installing a different image for a package. Sure that would be good my email is on my profile. |
Some sample output:
|
b329cac
to
8b6f302
Compare
…existing installation
…n modifying image
…it to yml configs
…all of new image for package
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.
One concern, but can be solved independently
merging
if changed, diff, err := installed.HasChanges(ctx, cli); err != nil { | ||
return err | ||
} else if changed { | ||
fmt.Println("There are differences between the installed version of the package and the image:") |
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 would prefer a stated message like
Updating this package would be granted different permissions
Added access to environment variables:
<...>
@tjamet Thank you so much for having a look at these changes! I really appreciate this project and the potential it has to be really useful. Thank you for maintaining it and being part of it's success. I'm going to be working on a new pr soon that will allow installing public images without the need for a predefined entrypoint. This idea is along the lines of what is detailed here #20 . This will enable things like easily running arbitrary versions of interpreters or even golang :) |
This pr addresses a portion of #17 . It prompts the user to ask if they would like to overwrite their existing installation of a package with a new image. This was already possible via a forced installation but this wasn't evident to me at first at least.