{"version":"2.1.299","anchor":"hook-validation-adds-a-nobash-reason-for-powershell-sessio","canonical_anchor":"hook-validation-adds-a-nobash-reason-for-powershell-sessio","heading":"Hooks that look written for bash can now be flagged on PowerShell setups","tier":"notice","area":"Windows","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/hook-validation-adds-a-nobash-reason-for-powershell-sessio","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Hooks that look written for bash can now be flagged on PowerShell setups\n\nOn a machine whose default shell is PowerShell, a command hook that isn't set up for PowerShell can now be flagged with a \"noBash\" reason\n\n**Unclear.** How the \"noBash\" reason is shown to the user, or what it does to the hook, is not stated.\n\n**What**\n\nA hook is a command you set to run automatically at a given moment, for example before a tool runs. A shell is the program that runs typed commands, such as bash or PowerShell. Claude Code now flags a command hook with the reason \"noBash\" when all of these are true:\n\n- The default shell is PowerShell.\n\n- The hook does not set its shell to powershell.\n\n- The hook has no args.\n\n- The hook does not set onFailure to continue.\n\n- A further check on the hook's event passes.\n\nBefore, this check could only report a problem with a setting, or nothing.\n\n**Why**\n\nOn Windows setups that use PowerShell, a hook written for bash can now be picked out instead of being run in the wrong shell without notice.\n\n- Area: Windows\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}