TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
4.94k stars 178 forks source link

post_bootstrap hook is not executed #375

Closed dennislapchenko closed 1 year ago

dennislapchenko commented 2 years ago

Describe the bug

Hooks with post_ and <command> should be invoked after successful commands execution. post_boostrap hook is not executed after yadm bootstrap

To reproduce

HOOKPATH=$HOME/.config/yadm/hooks/post_bootstrap
echo "echo test bs log" > $HOOKPATH && chmod a+x $HOOKPATH
yadm bootstrap

Alternatively a:

HOOKPATH=$HOME/.config/yadm/hooks/post_pull
echo "echo test pull log" > $HOOKPATH && chmod a+x $HOOKPATH
yadm pull

Outputs:

Already up to date.
test pull log

Expected behavior

Given correct hooks location is created, with properly named file and permissions: post hook for yadm bootstrap should be executed.

Environment

shadowrylander commented 2 years ago

For me, pre_commit does not seem to be working, either.

TheLocehiliosan commented 2 years ago

@dennislapchenko - This does seem to be a bug, bootstrap is run via an exec (the commands becomes the bootstrap command). So no post_hook is ever processed.

@shadowrylander - pre_commit should work without any issue. Is your pre_commit file executable?

shadowrylander commented 2 years ago

I am currently not a position to check, but I'll let you know once my setup is finalized!

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.