* Since `pushd` and `popd` have the same failure cases, make the check for SC2164 apply to them as well. * This commit also refactors the code a bit as `hasSetE` is now used in multiple places. * Fixes #863. Signed-off-by: mr.Shu <mr@shu.io>