Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davissp14 committed Jul 2, 2024
1 parent d19644c commit 2ac4327
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions cmd/start/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ func main() {
return
}

// TODO - Find a better way to handle this
if os.Getenv("BARMAN_ENABLED") != "" || os.Getenv("BARMAN_REMOTE_RESTORE") != "" {
if err := os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "/data/.aws/credentials"); err != nil {
panicHandler(err)
return
}
}

node, err := flypg.NewNode()
if err != nil {
panicHandler(err)
Expand Down
4 changes: 0 additions & 4 deletions internal/flypg/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ func (n *Node) Init(ctx context.Context) error {
if err := writeS3Credentials(ctx, s3AuthDir); err != nil {
return fmt.Errorf("failed to write s3 credentials: %s", err)
}

if err := os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "/data/.aws/credentials"); err != nil {
return fmt.Errorf("failed to set aws credentials path: %s", err)
}
}

store, err := state.NewStore()
Expand Down

0 comments on commit 2ac4327

Please sign in to comment.