Closed vchirikov closed 4 years ago
What would you expect the contents of the files to look like? The only two options I see are:
local.toml
and global.toml
are empty - this is definitely not useful enough to be worth implementingglobal.toml
with all the "source" files and placeholder values for their target location
local.toml
that selects that package
I doubt that would be useful enough to be worth implementing either...What are your thoughts?
I tried the tool today and got
[ERROR] Failed to deploy
Caused by:
Failed to get a configuration
Failed to parse config file dotter_settings/local.toml
Failed to parse file dotter_settings/local.toml
Failed to missing field `packages`
because I didn't have any "packages" in my empty local.toml. Your example (I mean your dotfiles repo) doesn't have this file too. So it took some time to figure out what to add and where I can find an example of this. So yes, I think is't good idea to give new users something to bootstrap a default "package".
I see. Now that I think about it, it could be a good idea to make it easier to "just get it working".
Where do you think I should mention this option in the documentation (readme and wiki)? Which place would you be the most likely to spot it if you were a new user? (of course it will also be described in --help
)
By the way, for more information about the configuration files, check out this wiki page.
It would be nice to get "help" if the tool didn't find any configs (like git
for example). Today dotter
throws the error:
> dotter
[ERROR] Failed to deploy
Caused by:
Failed to get a configuration
Failed to find config files
And maybe the tool should deploy all configurations if local.toml
not found or the config line with packages
is missing
And maybe the tool should deploy all configurations if
local.toml
not found or the config line withpackages
is missing
I think that'd be unexpected behavior. I understand wanting it to "just work" in the trivial case without a local.toml
, but a mature local.toml
has more than just packages
- it can have additional variables and file overrides. Just deploying all packages in case such a local.toml
isn't found potentially result in files thrown in wrong locations with wrong content - nothing an --undeploy
can't fix, but still a bad user experience in my opinion.
Plus, having dotter init
would cover the "just make it work" use-case anyways.
Closed in 9a5db71bcf9e1b6088c2d268f8731edd56289daf.
@vchirikov , I'd appreciate it if you checked it out :)
EDIT: It's in Release v0.8.0
Reopening to remind myself that I also need to document this
Mentioned it in "Setup" wiki page
Hi, it will be useful to have the
init
command to create adotter_settings
folder with configs.