dotbot: An error was encountered while executing action link
Here is my current install.conf.yaml file:
#!/usr/bin/env bash
- clean: ['~']
set -e
- link:
~/.tmux.conf: tmux.conf
~/.vim: vim/
~/.vimrc: vimrc
~/.zsh: zsh/
~/.zshrc: zshrc
- shell:
- [git submodule update --init --recursive, Installing/updating submodules]
Here is my install script:
#!/usr/bin/env bash
CONFIG="install.conf.yaml"
DOTBOT_DIR="dotbot"
DOTBOT_BIN="bin/dotbot"
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${BASEDIR}"
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
Here is my output:
All targets have been cleaned
An error was encountered while executing action link
Action link not handled
Action ~/.zsh not handled
Action ~/.vimrc not handled
Action ~/.vim not handled
Action ~/.zshrc not handled
Action ~/.tmux.conf not handled
Installing/updating submodules [git submodule update --init --recursive]
All commands have been executed
==> Some tasks were not executed successfully
This happens no matter what. I have created and destroyed multiple vimrc, zshrc, etc. files, I have completely removed Dotbot and re-downloaded it, I have tried using JSON formatting. Nothing I seem to try will let me create the links. I’m not sure what the problem is at this point; any suggestions will be appreciated.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 21 (8 by maintainers)
Commits related to this issue
- Fixed indentation issues See: https://github.com/anishathalye/dotbot/issues/8 — committed to pcalves/dotfiles by pcalves 6 years ago
I’m glad it’s working now. The issue is that the file represents an array, and the second element of that array is an object with the single mapping,
link
to an array of links. Written this way:It is interpreted as the following structure:
But what you want is this (4 spaces before the vimrc entry):
Which is equivalent to:
Whitespace as part of syntax is kinda annoying, but YAML looks a lot nicer. It’s a tradeoff… And yeah, the JSON, with the right structure, should work.
And by the way, the
.yaml
file is not a bash script, so I’m not sure why there is a#!/usr/bin/env bash
andset -e
. The shebang should be treated as a YAML comment, so it’ll still work, but theset -e
would cause problems…Encountered the same error message running on a windows 10 machine with python 2.7.13 and git shell (MINGW64).
Upon further investigation the root cause of my issue was that git shell didn’t have sufficient permissions to create a symlink. Running git shell as admin resolved the issue. I also updated python to 3.x
Future Explorers: My issue was caused by my “$SHELL” environment variable containing a newline. Correcting that fixed it. Original problem follows
I’m experiencing this with a config that previously worked… perhaps I made a change and didn’t notice, I do have a yaml formatter on this repo.
I’m indenting with 4 spaces.
This exact install yaml worked a couple of days ago.