mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
Use base of absolute path for local dependencies
This allows using local paths like "..", which previously messed up environments.
This commit is contained in:
parent
5e6ad10c79
commit
671f2568c4
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