Closed sohang3112 closed 2 years ago
The Linux installation via make install
does a system-wide install of todo.sh; it does not create a config file for the current (or even all) users.
Now, if you follow the instructions to the letter and use the configuration parameter CONFIG_DIR=/etc
, then the global configuration will be installed in /etc/todo/config
, and that location will be picked up as it's one of the default config locations, so you wouldn't get the Fatal Error: Cannot read configuration file
error.
However (details in #377 and a documentation improvement in #379), the configuration that gets installed by make install
(whether picked up automatically as default config or not), is meant to be a template that users can use as a basis for their own configuration - many users want to customize the colors or behavior, and on Linux there's a clear separation between a global config template (often in /etc
) and the user's individual actual configuration (in their home directory).
So, when make install
failed for you, you should have fixed the permission issue, either by using something like sudo make install
to obtain the admin rights, or by opening the directory permissions, or by choosing different writable directories via the config parameters. Creating a user configuration is not part of make install
.
I'm sorry that you've been misled; initially, the "installation" was just a manual copying of the very few files (program, completion, config template), now we have a customizable Makefile, but the documentation still isn't perfect here, and no matter what, installation via Makefile will always remain unnatural for "ordinary" users. I hope that in the future, more distributions (currently only Arch) will offer a package that will automatically install everything correctly.
Your "workaround" of manually creating your user's config is exactly what's expected of a new todo.sh user. I hope you'll still like the tool!
The details you mentioned here should be part of the documentation - maybe you could add a file called NEW-TO-MAKE.md
and link to that?
Especially the part about about running make install
as root should definitely be written in the install instructions.
Yes, details will be added. Most users unfortunately don't read documentation, especially not separate files (even if they are SCREAMING).
Installing via Makefile has always been ./configure && make && sudo make install
- I've known this for decades ;-) But this just applies to (apparently old and grey) Unix developers - my point was that the tool should not expect ordinary users to know such things. A Makefile fundamentally is the wrong approach, and we'll never make this user-friendly - install packages are, though.
Do you want to request a feature or report a bug? A bug.
What is the current behavior? While following the install instructions for Linux, folder
~/.todo
was not created due to some permission issue. So when I rantodo.sh
, it showed the errorFatal Error: Cannot read configuration file /home/sohang/.todo/config
.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. After cloning this repository and doing
cd <REPOSITORY-PATH>
:Note: I found a workaround for this (manually creating
~/.todo/config
) but that should have been done automatically.What is the expected behavior? Config file
~/.todo/config
should be created during install.Which versions todo.sh are you using?
Which Operating System are you using? WSL 2 (Ubuntu 20.04), Host is Windows 11
Which version of bash are you using?