-
Notifications
You must be signed in to change notification settings - Fork 239
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
[Feature Request] don't inject envman if ~/.local/bin is already in the path #322
Comments
Because there's no standard way to define or check for HOWEVER, I think it would be very reasonable to always include a What do you think about that? |
P.S. What problem were you experiencing that made it important to not have |
webinstall isn’t just adding ~/.local/bin a second time, though I’d ask why bother modifying user’s config files to do so. webinstall is adding an entire new include location that could have arbitrary PATHs added to it. I manage my config files in git, so it was quite obvious to me that this was added. The problem is it’s an unnecessary addition, and I’d either have to manage this new file or blindly trust whatever PATHs are in it. I’m excited about this project. I like the idea of a single installer script that can install multiple different tools, given that this is how projects are shipping now. I’d be happy to prepare a PR if you’re ok with this request. |
Yeah, that would be great. I may be better to put that logic into pathman as an option rather than webi, but you investigate and let me know what you think is the best route. I expect to continue to support bash and fish on all OSes (including Windows), and powershell and cmd.exe on Windows (bonus if powershell works on *nix too, but not a goal). And I definitely want to be more clear on the installers as to what files are modified, but that’s another topic perhaps. |
Many platform-programs, such as node and go - and even should-be-standalone apps, such as gpg - need to have multiple of their own PATH updates, such as The idea behind envman / pathman is to create a standard machine-readable location for cross-shell changes - kinda like |
I've outlined this in previous discussions as well, but (like a lot of users) I maintain my dotfiles using git, and I hate when tools change things around without asking me. To me, the best tool would be a tool that:
I'm not very happy with the fact that that the |
I completely agree with @ajeetdsouza, and it was their app zoxide which brought me here. |
The problem of askingAsking is a problem for two reasons:
That said, what's good for average Joe macOS users shouldn't have to annoy power users. Possible optionsThat said, I'm very open to adding an option The evil of
|
It looks like this will require modifying pathman, since that is where the existing comment is being generated. https://git.rootprojects.org/root/pathman/src/commit/2c283a28649a692fea764894415cfa6b74fe2f5b/envpath/manager.go#L185 Combining a more appropriate comment with outputting that this is happening would seem an appropriate first step for me. The latter could be done by not redirecting the pathman output to a file: webi-installers/_webi/template.sh Line 245 in 2d68b08
I've looked through the code, but will not be submitting a PR after a further review. This issue is not an appropriate forum for a difference of vision, but if you're interested in a more detailed set of feedback let me know. |
Are you talking about the Go code, the Bash, or the Node that templates that Bash? The Go code should be pretty straightforward to add a flag to update the comment. It would also be nice to change the output options. The bash code has gotten grosser over time. Just lots of edge cases and... it's bash. Now that the use cases have been explored, however, I think that there's a fair amount of code that can be eliminated and, ultimately, I think it could work to move toward mostly pre-generated installer scripts.
Let's do it: #329 |
I see. A separate
While I understand that you'd prefer to do what works by default, I would have preferred a prompt for "Would you like to add these paths automatically to your .bashrc? [Y/n]", where the default answer is yes.
I'm not sure how pathman would help here. Suppose I have two programs (say X and Y) installed to Even if it does do that, suppose I have started relying on This is why I suggest that users should be allowed to maintain their PATHs in their own config files. We could automatically add a line to the user's config file, but after that the user should be allowed to manage the paths themselves. Moreover, this can/should be achieved inside bash / powershell itself, without the need for pathman. pathman does seem a bit overkill here.
This sounds great.
Agreed. |
@coolaj86 here's another issue I got regarding this: ajeetdsouza/zoxide#318 This has also been mentioned in a discussion: #348 For automated installers, a major problem that users have is trust. While I appreciate the goal of never using
I'd appreciate it if you could tell me if this is a planned feature for Webi v2, because all 3 of these users have come from zoxide, which lists |
Personally I reverted to the old |
Fixed in #612, just for you @adamcstephens! 😘 |
Hello. I have ~/.local/bin in my PATH already, but webinstall is injecting the envman inclusion anyway. It took me some digging to figure out this came from webinstall, as the message
# Generated for envman. Do not edit.
does not indicate the true source.Would it be possible to check the existing PATH and not inject these lines?
The text was updated successfully, but these errors were encountered: