mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: Removed coreutils (realpath) from dependencies for MacOS (#368)
This commit is contained in:
parent
4874cfe42e
commit
944a2e5fef
14 changed files with 15 additions and 17 deletions
|
|
@ -6,7 +6,7 @@ set -eo pipefail
|
|||
# shellcheck disable=SC2034 # Unused var.
|
||||
readonly HOOK_ID='terraform_validate'
|
||||
# shellcheck disable=SC2155 # No way to assign to readonly variable in separate lines
|
||||
readonly SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
# shellcheck source=_common.sh
|
||||
. "$SCRIPT_DIR/_common.sh"
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ function terraform_validate_ {
|
|||
|
||||
if [[ -n "$(find "$dir_path" -maxdepth 1 -name '*.tf' -print -quit)" ]]; then
|
||||
|
||||
pushd "$(realpath "$dir_path")" > /dev/null
|
||||
pushd "$(cd "$dir_path" && pwd -P)" > /dev/null
|
||||
|
||||
if [ ! -d .terraform ]; then
|
||||
set +e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue