Skip to content
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

Default to user writable directory in config #148

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

kprussing
Copy link
Contributor

When a user installs from a package manager (MacPorts, Homebrew,
yum, etc.), the todo.sh script is installed into a restricted
folder. This means that the result of $(basename "$0") is a directory
where the user cannot write without elevated permissions. This
generates additional noise when the user first runs todo.sh -h. An
alternative is to default to the user's personal directory which is
known to exist and will be writable by the user.

When a user installs from a package manager ([MacPorts], [Homebrew],
`yum`, etc.), the `todo.sh` script is installed into a restricted
folder.  This means that the result of `$(basename "$0")` is a directory
where the user cannot write without elevated permissions.  This
generates additional noise when the user first runs `todo.sh -h`.  An
alternative is to default to the user's personal directory which is
known to exist and will be writable by the user.

[MacPorts]: https://www.macports.org
[Homebrew]: http://brew.sh
@karbassi karbassi added this to the Version 2.12.0 milestone Mar 26, 2018
Copy link
Member

@inkarkat inkarkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storing user data next to the application itself is a bad idea in general. I agree that defaulting to the home directory is a better default here.

@karbassi karbassi merged commit 587833b into todotxt:master Aug 6, 2021
wwalker pushed a commit to wwalker/todo.txt-cli that referenced this pull request Sep 19, 2021
When a user installs from a package manager (MacPorts, Homebrew, `yum`, etc.), the `todo.sh` script is installed into a restricted folder.  This means that the result of `$(basename "$0")` is a directory where the user cannot write without elevated permissions.  This generates additional noise when the user first runs `todo.sh -h`.  An alternative is to default to the user's personal directory which is known to exist and will be writable by the user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants