Skip to content

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