Skip to content

Commit

Permalink
Fixes an issue with chart_depth when charts_dir is . (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: chrisbsmith <[email protected]>
  • Loading branch information
Chris Smith authored Jun 16, 2021
1 parent c25b74a commit 702702f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 702702f

Please sign in to comment.