fix: remote file provided to `set.file` should not break helmfile (#474)
Fixes #473
This commit is contained in:
parent
f2bdcb9113
commit
35fd5ff117
4
Makefile
4
Makefile
|
|
@ -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}
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "dist/helmfile_linux_amd64" -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||||
.PHONY: linux
|
.PHONY: linux
|
||||||
|
|
||||||
|
install:
|
||||||
|
env CGO_ENABLED=0 go install -ldflags '-X main.Version=${TAG}' ${TARGETS}
|
||||||
|
.PHONY: install
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm dist/helmfile_*
|
rm dist/helmfile_*
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import (
|
||||||
"github.com/roboll/helmfile/tmpl"
|
"github.com/roboll/helmfile/tmpl"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HelmState structure for the helmfile
|
// HelmState structure for the helmfile
|
||||||
|
|
@ -857,7 +858,8 @@ func (st *HelmState) JoinBase(relPath string) string {
|
||||||
|
|
||||||
// normalizes relative path to absolute one
|
// normalizes relative path to absolute one
|
||||||
func (st *HelmState) normalizePath(path string) string {
|
func (st *HelmState) normalizePath(path string) string {
|
||||||
if filepath.IsAbs(path) {
|
u, _ := url.Parse(path)
|
||||||
|
if u.Scheme != "" || filepath.IsAbs(path) {
|
||||||
return path
|
return path
|
||||||
} else {
|
} else {
|
||||||
return st.JoinBase(path)
|
return st.JoinBase(path)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue