ITADN

SC2311 doesn't trigger with inherit_errexit but it should

#3450Openjakub-bochenski 创建于 2026-04-15
J
jakub-bochenskicommented
#### For bugs with existing features - Rule Id (if any, e.g. SC1000): SC2311 - My shellcheck version (`shellcheck --version` or "online"): 0.11.0 - [x] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086) - [ ] I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit ^ this is optional rule #### Here's a snippet or screenshot that shows the problem: ```sh #!/usr/bin/env bash set -e shopt -s inherit_errexit fail() { echo "failing..." return 1 } echo "before substitution" echo TEST > "$(fail)" echo "after substitution (still running!)" ``` outputs: ``` before substitution after substitution (still running!) ``` #### Here's what shellcheck currently says: Nothing #### Here's what I wanted or expected to see: Log SC2311 violation
0 条评论