deadc0de6 / dotdrop

Save your dotfiles once, deploy them everywhere
https://dotdrop.readthedocs.io
GNU General Public License v3.0
1.79k stars 105 forks source link

[bug] Including actions from profile does not work #375

Closed DakEnviy closed 1 year ago

DakEnviy commented 1 year ago

Dotdrop version (and git commit if run from source): v1.12.3.367df16db72c1d8d04a29543af9ee08d5b7922b9 Using dotdrop: as a submodule with virtualenv

Describe the bug

This my dotdrop config: https://github.com/DakEnviy/dotfiles/blob/c7ef6f8df4357545b1273028789ede75f9e6a7ec/config.yaml When I try to install underworld profile action omf-install doesn't run. But when I install only app:fish profile everything works ok.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create some action
  2. Create some profile (profile A)
  3. Add created action to this profile
  4. Create another profile (profile B) and include profile A
  5. Install profile B
  6. Action didn't run

Expected behavior

Actions should run from an included profile.

Additional information

The relevant part of the config file


actions:
  pre:
    vim-plug-install: test -e ~/.vim/autoload/plug.vim || curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  post:
    vim-plug: vim +PlugInstall +qall
    omf-install: test -e ~/.config/fish/conf.d/omf.fish || (curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish)
config:
  backup: true
  create: true
  dotpath: store
dotfiles:
  f_vimrc:
    src: vimrc
    dst: ~/.vimrc
    actions:
    - vim-plug-install
    - vim-plug
  f_tmux.conf:
    src: tmux.conf
    dst: ~/.tmux.conf
  d_fish:
    src: config/fish
    dst: ~/.config/fish
    chmod: '700'
  d_omf:
    src: config/omf
    dst: ~/.config/omf
profiles:
  'app:vim':
    dotfiles:
    - f_vimrc
  'app:tmux':
    dotfiles:
    - f_tmux.conf
  'app:fish':
    dotfiles:
    - d_fish
    - d_omf
    actions:
    - omf-install
  underworld:
    include:
    - 'app:vim'
    - 'app:tmux'
    - 'app:fish'

Dotdrop's execution with the debug logs (--verbose)

$ dotdrop install -p underworld --verbose
...
https://controlc.com/4e64d80e

It's funny but with --verbose flag omf-install action runs =)

deadc0de6 commented 1 year ago

Hey, thanks for reporting this. It was indeed a bug and it should be fixed by above commit. Since you use dotdrop as a submodule, updating it should bring you the bugfix.

DakEnviy commented 1 year ago

Thank you, fix works fine)