Skip to content

Commit

Permalink
Merge pull request #58 from flownative/bugfix/56-resource-download-pa…
Browse files Browse the repository at this point in the history
…rt-ii

Make resource-download work one- & two-bucket setup
  • Loading branch information
kdambekalns authored Jan 10, 2023
2 parents f3149a6 + 2c5b3fe commit 4f3eb43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/beach/cmd/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func retrieveCloudStorageCredentials(instanceIdentifier string, projectNamespace
s := strings.SplitN(line, "=", 2)
if len(s) == 2 {
switch s[0] {
case "BEACH_GOOGLE_CLOUD_STORAGE_TARGET_BUCKET", "BEACH_GOOGLE_CLOUD_STORAGE_PUBLIC_BUCKET":
case "BEACH_GOOGLE_CLOUD_STORAGE_STORAGE_BUCKET", "BEACH_GOOGLE_CLOUD_STORAGE_PUBLIC_BUCKET":
bucketName = s[1]
case "BEACH_GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT_PRIVATE_KEY":
encodedPrivateKey = s[1]
Expand Down
2 changes: 1 addition & 1 deletion cmd/beach/cmd/resource-download.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func handleResourceDownloadRun(cmd *cobra.Command, args []string) {
return
}

file, err := os.OpenFile(targetPath+"/"+filepath.Dir(attributes.Name), os.O_RDWR|os.O_CREATE, 0644)
file, err := os.OpenFile(targetPath+"/"+filepath.Base(attributes.Name), os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
log.Fatal(err)
return
Expand Down

0 comments on commit 4f3eb43

Please sign in to comment.