Skip to content

[OSX] missing ~/.aws folder prevents cca init running #21

@sandfox

Description

@sandfox

If there is no ~/.aws folder, cca init can't run.

After installing cca on a new machine and then running cca init <token> it then fails with the following:

INI file: /Users/sandfox/.aws/credentials does not exist
Traceback (most recent call last):
  File "/Users/sandfox/Library/Python/3.8/lib/python/site-packages/cca/cca.py", line 35, in <module>
    config = IniFile(os.path.expanduser(configfn), takebackup=False)
  File "/Users/sandfox/Library/Python/3.8/lib/python/site-packages/cca/cliinifile.py", line 52, in __init__
    raise FileExistsError("INI file: {} does not exist".format(self.filename))
FileExistsError: INI file: /Users/sandfox/.aws/credentials does not exist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sandfox/Library/Python/3.7/bin/cca", line 6, in <module>
    from cca.cca import cca
  File "/Users/sandfox/Library/Python/3.8/lib/python/site-packages/cca/cca.py", line 49, in <module>
    open(os.path.expanduser(configfn), "a").close()
FileNotFoundError: [Errno 2] No such file or directory: '/Users/sandfox/.aws/credentials'

creating the folder ~/.aws allows the command to complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions