Skip to content

Commit

Permalink
fix(helm): resolve symlinks when loading chart
Browse files Browse the repository at this point in the history
Possible fix for #1639
  • Loading branch information
redbaron committed Feb 23, 2017
1 parent c03714e commit edd4e56
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import:
- package: github.com/gobwas/glob
version: ^0.2.1
- package: github.com/evanphx/json-patch
- package: github.com/facebookgo/symwalk
testImports:
- package: github.com/stretchr/testify
version: ^1.1.4
Expand Down
3 changes: 2 additions & 1 deletion pkg/chartutil/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"compress/gzip"
"errors"
"fmt"
"github.com/facebookgo/symwalk"
"io"
"io/ioutil"
"os"
Expand Down Expand Up @@ -239,7 +240,7 @@ func LoadDir(dir string) (*chart.Chart, error) {
files := []*afile{}
topdir += string(filepath.Separator)

err = filepath.Walk(topdir, func(name string, fi os.FileInfo, err error) error {
err = symwalk.Walk(topdir, func(name string, fi os.FileInfo, err error) error {
n := strings.TrimPrefix(name, topdir)

// Normalize to / since it will also work on Windows
Expand Down

0 comments on commit edd4e56

Please sign in to comment.