Skip to content

Commit

Permalink
Do not modify paths that are already absolute. (grafana#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg authored Aug 24, 2021
1 parent c7b2395 commit d3e644d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/grizzly/jsonnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ func newExtendedImporter(path string, jpath []string) *ExtendedImporter {
absolutePaths := make([]string, len(jpath)+1)
absolutePaths = append(absolutePaths, path)
for _, p := range jpath {
absolutePaths = append(absolutePaths, filepath.Join(path, p))
if !filepath.IsAbs(p) {
p = filepath.Join(path, p)
}
absolutePaths = append(absolutePaths, p)
}
return &ExtendedImporter{
loaders: []importLoader{
Expand Down

0 comments on commit d3e644d

Please sign in to comment.