mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 03:47:20 +00:00
fixed unbound variable
This commit is contained in:
parent
80e364a5d0
commit
3c938dc216
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ function dirname_max_depth() {
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
|
|
||||||
local dirs=($(echo "$dir" | tr "/" " "))
|
local dirs=($(echo "$dir" | tr "/" " "))
|
||||||
local max_depth="${#dirs[@]}"
|
local max_depth=${#dirs[@]}
|
||||||
|
INPUT_DIR_NAMES_MAX_DEPTH="${INPUT_DIR_NAMES_MAX_DEPTH:-$max_depth}"
|
||||||
|
|
||||||
if [[ -n "$INPUT_DIR_NAMES_MAX_DEPTH" && "$INPUT_DIR_NAMES_MAX_DEPTH" -lt "$max_depth" ]]; then
|
if [[ -n "$INPUT_DIR_NAMES_MAX_DEPTH" && "$INPUT_DIR_NAMES_MAX_DEPTH" -lt "$max_depth" ]]; then
|
||||||
max_depth="$INPUT_DIR_NAMES_MAX_DEPTH"
|
max_depth="$INPUT_DIR_NAMES_MAX_DEPTH"
|
||||||
|
|
Loading…
Reference in a new issue