fix: remote file provided to `set.file` should not break helmfile (#474)

Fixes #473
This commit is contained in:
KUOKA Yusuke 2019-02-14 18:13:32 +09:00 committed by GitHub
parent f2bdcb9113
commit 35fd5ff117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,10 @@ static-linux:
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "dist/helmfile_linux_amd64" -ldflags '-X main.Version=${TAG}' ${TARGETS}
.PHONY: linux
install:
env CGO_ENABLED=0 go install -ldflags '-X main.Version=${TAG}' ${TARGETS}
.PHONY: install
clean:
rm dist/helmfile_*
.PHONY: clean

View File

@ -23,6 +23,7 @@ import (
"github.com/roboll/helmfile/tmpl"
"go.uber.org/zap"
"gopkg.in/yaml.v2"
"net/url"
)
// HelmState structure for the helmfile
@ -857,7 +858,8 @@ func (st *HelmState) JoinBase(relPath string) string {
// normalizes relative path to absolute one
func (st *HelmState) normalizePath(path string) string {
if filepath.IsAbs(path) {
u, _ := url.Parse(path)
if u.Scheme != "" || filepath.IsAbs(path) {
return path
} else {
return st.JoinBase(path)