Skip to content

Commit

Permalink
fix: corrent prefix when uploading files #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMenoti committed Nov 12, 2024
1 parent 4958cef commit 04c9980
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/api/s3/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"path"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
Expand Down Expand Up @@ -55,7 +56,7 @@ func New(s3AccessKey, s3SecretKey string) (aws.Config, error) {
func UploadFile(ctx context.Context, cfg aws.Config, fileOps *contracts.FileOps, bucketName, prefix string) error {
file := fileOps.Path
if prefix != "" {
file = fmt.Sprintf("%s%s", prefix, fileOps.Path)
file = path.Join(prefix, fileOps.Path)
}

s3Client := s3.NewFromConfig(cfg)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (cmd *initCmd) Run(c *cobra.Command, _ []string) error {

func (cmd *initCmd) deps(c *cobra.Command, m string, msgs *[]string) error {
if !c.Flags().Changed("package-manager") {
if !utils.Confirm(cmd.globalFlagAll, m, true) {
if !utils.Confirm(cmd.globalFlagAll, m, false) {
return nil
}

Expand Down

0 comments on commit 04c9980

Please sign in to comment.