-
Notifications
You must be signed in to change notification settings - Fork 121
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
Global install and uninstall #41
Conversation
I'm also thinking of changing the mint path from |
let existingString: String = try file.read() | ||
if !existingString.contains(exportSection) { | ||
let newString = "\(existingString)\n\n\(exportSection)" | ||
try file.write(newString) |
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.
Probably worth logging out that this is happening, but this makes sense to me 👍
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.
done
|
||
try files.forEach { | ||
let file = Path($0).absolute() | ||
if file.exists { |
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 am not sure if the use of a shell guarantees it will have a log‐on script. If the user has not configured anything yet, I do not know if the file would just be empty or completely non‐existent.
It is a clever way of checking which shells the user likely prefers, so I recommend keeping it this way for now unless someone files a bug.
and some test refactoring
Resolves #1
This allows installing a package globally. At the moment this is behind a
--global
flag, which may change to the default in the future.There is also an obligatory
uninstall
command