Skip to content

Commit

Permalink
Use go-getter only for archive fetches
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsmydoing committed Dec 16, 2020
1 parent 67e445c commit 2188fe9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions api/loader/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@ func getRemoteTarget(rs *remoteTargetSpec) error {
log.Fatalf("Error getting wd: %s", err)
}

httpGetter := &getter.HttpGetter{
Netrc: true,
}

opts := []getter.ClientOption{}
client := &getter.Client{
Ctx: context.TODO(),
Src: rs.Raw,
Dst: rs.Dir.String(),
Pwd: pwd,
Mode: getter.ClientModeAny,
Detectors: []getter.Detector{
new(getter.GitHubDetector),
new(getter.GitLabDetector),
new(getter.GitDetector),
new(getter.BitBucketDetector),
Mode: getter.ClientModeDir,
Detectors: []getter.Detector{},
Getters: map[string]getter.Getter{
"http": httpGetter,
"https": httpGetter,
},
Options: opts,
}
Expand Down

0 comments on commit 2188fe9

Please sign in to comment.