SuperCuber / dotter

A dotfile manager and templater written in rust 🦀
The Unlicense
882 stars 46 forks source link

Failed to deploy #93

Closed ghost closed 2 years ago

ghost commented 2 years ago

Environment

The question

I installed dotter using cargo. I would like to keep dotter binaries out of the repo, since I want to save the space and think only source files should go into repos. I can't seem to deploy like this, though. I already tried running dotter -g ~/.dotfiles/.dotter/global.toml but that didn't work either.

What's the problem here? How can I fix this?

SuperCuber commented 2 years ago

Are you running from ~/.dotfiles as your working directory? (You are supposed to)

If you are, is there more to the error?

ghost commented 2 years ago

Are you running from ~/.dotfiles as your working directory? (You are supposed to)

Yup.

If you are, is there more to the error?

Just what I've already provided:

[ERROR] Failed to deploy
Caused by:
    get a configuration
    merge configuration files
    get info of package default
SuperCuber commented 2 years ago

Post global.toml and local.toml (and included if you have)

ghost commented 2 years ago

global.toml:

[zsh.files]
# this file sets $ZDOTDIR
"zsh/env_init" = "$HOME/.zshenv"
"zsh/env" = "$XDG_CONFIG_HOME/zsh/.zshenv"
"zsh/rc" = "$XDG_CONFIG_HOME/zsh/.zshrc"
"zsh/profile" = "$XDG_CONFIG_HOME/.zprofile"

[nvim.files]
nvim = "$XDG_CONFIG_HOME/nvim"

local.toml:

includes = []
packages = ["default"]

[files]

[variables]

Now that I see this, did I maybe delete some of the necessary boilerplate in global.toml?

SuperCuber commented 2 years ago

You're selecting the wrong thing in packages of local.toml. In your case it should be ["zsh", "nvim"]

I should change the error message to be more informative so keep the issue open :)

ghost commented 2 years ago

It now works, thanks :) can I somehow define a default package list here, though? So that I basically have an empty local.toml and just derive everything from the global.toml.

SuperCuber commented 2 years ago

there's currently no "select all packages" option

ghost commented 2 years ago

would be nice if no local.toml exists would mean "select all packages". Seems intuitive to me. As in "no local overrides"

SuperCuber commented 2 years ago

You could add a special "all" package and have

[all]
depends =["my","packages"]

Then select it in local.toml