diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7529e72dfa9..9c3b80eadc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: hooks: - id: shfmt types: [text] - files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ + files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fixtures/.+/bin/.+|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ exclude: ^completions/(\.gitignore|Makefile.*)$ - repo: https://github.com/shellcheck-py/shellcheck-py @@ -22,7 +22,7 @@ repos: - id: shellcheck args: [-f, gcc] types: [text] - files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ + files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fixtures/.+/bin/.+|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ exclude: ^completions/(\.gitignore|Makefile.*)$ require_serial: false # We disable SC1090 anyway, so parallel is ok diff --git a/test/fixtures/mount/bin/showmount b/test/fixtures/mount/bin/showmount index 2751c4bae26..c79ee06010e 100755 --- a/test/fixtures/mount/bin/showmount +++ b/test/fixtures/mount/bin/showmount @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -if [ "$1" = -e ] && [ "$2" = mocksrv ]; then +if [[ $1 == -e && $2 == "mocksrv" ]]; then echo "Header line" echo "/test/path" echo "/test/path2"