Skip to content

Wrap hook call in subshell#2

Closed
Ealdwulf wants to merge 1 commit intoNetworkConfiguration:masterfrom
Ealdwulf:patch-1
Closed

Wrap hook call in subshell#2
Ealdwulf wants to merge 1 commit intoNetworkConfiguration:masterfrom
Ealdwulf:patch-1

Conversation

@Ealdwulf
Copy link

Currently hooks are executed in the same shell. This means that if the hook script executes exit, subsequent hooks are not run. The man page doesn't document this behavior - indeed, it says all hooks are run. Wrapping in a subshell should avoid this.

This is a behavior change. If it is anticipated that any users utilise this behavior, then it might not be possible to make this change so simply.

Currently hooks are executed in the same shell. This means that if the hook script executes `exit`, subsequent hooks are not run. The man page doesn't document this behavior - indeed, it says all hooks are run. Wrapping in a subshell should avoid this.
@rsmarples
Copy link
Member

I would rather the current behaviour is explicitly documented so that custom enter/exist hooks can affect the variables passed to other hooks.
I know for sure some users rely on this behaviour.

@Ealdwulf
Copy link
Author

That's a pity.

@Ealdwulf Ealdwulf closed this Feb 13, 2018
@Ealdwulf Ealdwulf deleted the patch-1 branch February 13, 2018 15:40
@rsmarples
Copy link
Member

This is now documented in d531f8b with a futher commit to fix a spelling mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants