Skip to content

Commit

Permalink
resolve symlink during copy for helm package
Browse files Browse the repository at this point in the history
symlinks inside the chart folder would be copied to the new directory
for package. If those symlinks are relative, they wouldn't resolve
  anymore in the new location.

Calling cp with `-L` should resolve the symlinks before copying.
  • Loading branch information
hensur committed Jun 10, 2024
1 parent 9583dfd commit 8fe3327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helm-git-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ helm_package() {
helm_args=${helm_args:-}

tmp_target="$(mktemp -d "$TMPDIR/helm-git.XXXXXX")"
cp -r "$_source_path" "$tmp_target/$_chart_name"
cp -rL "$_source_path" "$tmp_target/$_chart_name"
_source_path="$tmp_target/$_chart_name"
cd "$_target_path" >&2

Expand Down

0 comments on commit 8fe3327

Please sign in to comment.