mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
Merge pull request #103 from brancz/abs-local-source
Use base of absolute path for local dependencies
This commit is contained in:
commit
d78a05a86f
1 changed files with 5 additions and 1 deletions
|
|
@ -73,7 +73,11 @@ func (s Source) LegacyName() string {
|
||||||
case s.GitSource != nil:
|
case s.GitSource != nil:
|
||||||
return s.GitSource.LegacyName()
|
return s.GitSource.LegacyName()
|
||||||
case s.LocalSource != nil:
|
case s.LocalSource != nil:
|
||||||
return filepath.Base(s.LocalSource.Directory)
|
p, err := filepath.Abs(s.LocalSource.Directory)
|
||||||
|
if err != nil {
|
||||||
|
panic("unable to create absolute path from local source directory: " + err.Error())
|
||||||
|
}
|
||||||
|
return filepath.Base(p)
|
||||||
default:
|
default:
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue