Fixes an issue with chart_depth when charts_dir is . (#83)

Signed-off-by: chrisbsmith <chris.b.smith@gmail.com>
This commit is contained in:
Chris Smith
2021-06-16 14:49:55 +02:00
committed by GitHub
parent c25b74a986
commit 702702f86c
+1 -1
View File
@@ -225,7 +225,7 @@ lookup_changed_charts() {
local changed_files
changed_files=$(git diff --find-renames --name-only "$commit" -- "$charts_dir")
local depth=$(( $(tr "/" "\n" <<< "$charts_dir" | wc -l) + 1 ))
local depth=$(( $(tr "/" "\n" <<< "$charts_dir" | sed '/^\(\.\)*$/d' | wc -l) + 1 ))
local fields="1-${depth}"
cut -d '/' -f "$fields" <<< "$changed_files" | uniq | filter_charts