Skip to content

Commit

Permalink
fix: setup jfrog plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobmoellerdev committed Dec 3, 2024
1 parent e5f75d5 commit 7724758
Show file tree
Hide file tree
Showing 9 changed files with 236 additions and 288 deletions.
105 changes: 0 additions & 105 deletions api/ocm/extensions/blobhandler/handlers/generic/http/blobhandler.go

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions api/ocm/plugin/ppi/cmds/upload/put/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,17 @@ func Command(p ppi.Plugin, cmd *cobra.Command, opts *Options) error {
if u == nil {
return errors.ErrNotFound(descriptor.KIND_UPLOADER, fmt.Sprintf("%s:%s", opts.ArtifactType, opts.MediaType))
}

fi, err := os.Stdin.Stat()
if err != nil {
fmt.Println("failed to stat stdin", err)
}
if size := fi.Size(); size == 0 {
return fmt.Errorf("stdin is empty, and nothing can be uploaded")
}

h, err := u.Upload(p, opts.ArtifactType, opts.MediaType, opts.Hint, spec, opts.Credentials, os.Stdin)

if err != nil {
return fmt.Errorf("upload failed: %w", err)
}
Expand Down
Loading

0 comments on commit 7724758

Please sign in to comment.