mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
parent
dafc283219
commit
bff9df564e
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ func remoteResolveRef(ctx context.Context, remote string, ref string) (string, e
|
||||||
func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (string, error) {
|
func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (string, error) {
|
||||||
destPath := path.Join(dir, name)
|
destPath := path.Join(dir, name)
|
||||||
|
|
||||||
pkgh := sha256.Sum256([]byte(fmt.Sprintf("jsonnetpkg-%s-%s", strings.Replace(name, "/", "-", -1), version)))
|
pkgh := sha256.Sum256([]byte(fmt.Sprintf("jsonnetpkg-%s-%s", strings.Replace(name, "/", "-", -1), strings.Replace(version, "/", "-", -1))))
|
||||||
// using 16 bytes should be a good middle ground between length and collision resistance
|
// using 16 bytes should be a good middle ground between length and collision resistance
|
||||||
tmpDir, err := ioutil.TempDir(filepath.Join(dir, ".tmp"), hex.EncodeToString(pkgh[:16]))
|
tmpDir, err := ioutil.TempDir(filepath.Join(dir, ".tmp"), hex.EncodeToString(pkgh[:16]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue