You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(hooks): prevent stdin drain from skipping subsequent hooks (#165)
* fix(hooks): prevent stdin drain from skipping subsequent hooks
Add </dev/null to hook subshell to prevent commands that read stdin
(e.g. cat, read) from consuming the heredoc that feeds hook lines,
which caused all subsequent hooks to be silently skipped.
Fixes#164
* test(hooks): add regression test for stdin-draining hook
Verify that a hook running `cat` (which reads stdin) does not
prevent subsequent hooks from executing.
* test(hooks): extend stdin-drain regression tests to preRemove and postRemove
* fix(hooks): prevent stdin drain in run_hooks_export (postCd)
Add </dev/null to eval in run_hooks_export so hooks that read stdin
(e.g. cat, read) do not consume the heredoc feeding hook lines,
which caused subsequent postCd hooks to be silently skipped.
Also adds a regression test for the postCd case.
* fix(init): isolate postCd hook stdin in generated shells
* test(init): skip runtime shell checks when shell missing
---------
Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>
0 commit comments