mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50: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:
|
||||
return s.GitSource.LegacyName()
|
||||
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:
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue