common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
957 stars 90 forks source link

Create ~/.aws/config if it does not exist #590

Closed sosheskaz closed 6 months ago

sosheskaz commented 6 months ago

What changed?

Before copying ~/.aws/config to the temp file, make sure that it exists, even if only as an empty file.

Why?

Without this change, if ~/.aws/config does not exist, sync fails with:

$ dgranted registry sync
[✘] failed to copy aws config to tempfile for update

How did you test it?

Delete ~/.aws/config and run sync. Before, it failed. Now, it succeeds.

Potential risks

Is patch release candidate?

Yes

Link to relevant docs PRs