Skip to content

error on missing .zshrc #17

@00gavin

Description

@00gavin

Here's the error on macOS where I am missing a .zshrc and only use a .zprofile

% pip install --upgrade git+https://github.com/upenn/aws-federated-auth.git@v/1.1
...
Successfully installed aws-federated-auth-1.0.1

% aws-federated-auth --install-completion omz
{"time":"2026-03-04 09:35:15","name":"shib.shellcompletion","level":"   ERROR","message":"oh-my-zsh completion script _aws_profile_export() already exists in ~/.oh-my-zsh/custom/completions/_aws_profile_export.
No changes made.
If you want to update it, please remove the existing script first."}
The directory /Users/bug/.oh-my-zsh/custom/completions is not in your $fpath.
This location needs to be in your $fpath for the completion script to load automatically.
Do you want to add the location to your $fpath? (y/n): y
Traceback (most recent call last):
  File "/Users/bug/.virtualenvs/hpcc-lz/bin/aws-federated-auth", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/Users/bug/.virtualenvs/hpcc-lz/lib/python3.13/site-packages/shib/cli.py", line 240, in main
    shellcompletion_instance.install_completion(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        shell_type=args.install_completion,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        completion_location=args.completion_location
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/bug/.virtualenvs/hpcc-lz/lib/python3.13/site-packages/shib/shellcompletion.py", line 335, in install_completion
    self._install_omz_completion(completion_location)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bug/.virtualenvs/hpcc-lz/lib/python3.13/site-packages/shib/shellcompletion.py", line 421, in _install_omz_completion
    with open(os.path.expanduser('~/.zshrc'), 'r') as f:
         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/bug/.zshrc'

Fix is to: touch ~/.zshrc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions