Skip to content

Commit 6239cf2

Browse files
committed
fix: Manually format external URL
path.Join escaped the double slash!
1 parent 4f7ceeb commit 6239cf2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

buildinfo/buildinfo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package buildinfo
22

33
import (
4-
"path"
4+
"fmt"
55
"runtime/debug"
66
"sync"
77
"time"
@@ -43,7 +43,7 @@ func ExternalURL() string {
4343
if !valid {
4444
return repo
4545
}
46-
return path.Join(repo, "commit", revision)
46+
return fmt.Sprintf("%s/commit/%s", repo, revision)
4747
}
4848

4949
// Time returns when the Git revision was published.

provisionerd/provisionerd_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ func TestProvisionerd(t *testing.T) {
501501

502502
t.Run("ShutdownFromJob", func(t *testing.T) {
503503
t.Parallel()
504+
var completed sync.Once
504505
var updated sync.Once
505506
updateChan := make(chan struct{})
506507
completeChan := make(chan struct{})
@@ -532,7 +533,9 @@ func TestProvisionerd(t *testing.T) {
532533
}, nil
533534
},
534535
failJob: func(ctx context.Context, job *proto.FailedJob) (*proto.Empty, error) {
535-
close(completeChan)
536+
completed.Do(func() {
537+
close(completeChan)
538+
})
536539
return &proto.Empty{}, nil
537540
},
538541
}), nil

0 commit comments

Comments
 (0)