Skip to content

Check if a signed URL is specified and use it download tools #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve archive renamer and fix failing tests
  • Loading branch information
MatteoPologruto committed Jun 19, 2024
commit 887b22bbf9804958b3752002e51f20548892766a
7 changes: 5 additions & 2 deletions v2/pkgs/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,11 @@ func (t *Tools) Remove(ctx context.Context, payload *tools.ToolPayload) (*tools.
func rename(base string) extract.Renamer {
return func(path string) string {
parts := strings.Split(filepath.ToSlash(path), "/")
path = strings.Join(parts[1:], "/")
path = filepath.Join(base, path)
newPath := strings.Join(parts[1:], "/")
if newPath == "" {
newPath = filepath.Join(newPath, path)
}
path = filepath.Join(base, newPath)
return path
}
}
Expand Down