Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awscli2 completion is broken #103709

Closed
qrevel opened this issue Nov 13, 2020 · 0 comments · Fixed by #103718
Closed

awscli2 completion is broken #103709

qrevel opened this issue Nov 13, 2020 · 0 comments · Fixed by #103718
Labels
0.kind: bug Something is broken

Comments

@qrevel
Copy link
Contributor

qrevel commented Nov 13, 2020

Describe the bug
With the awscli2 package, the bash / zsh completion is broken as mentioned in 80956. It seems it is because it tries to open in read/write a database file in the /nix/store (next to the source code).

To Reproduce
Steps to reproduce the behavior:

  1. nix-env -i awscli2
  2. source /nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/share/zsh/site-functions/aws_zsh_completer.sh
  3. Try to autocomplete aws command

Expected behavior
The shell displays completions options

Screenshots

❯  aws Traceback (most recent call last):                                                                                                                                                                                               
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/bin/.aws_completer-wrapped", line 37, in <module>                                                                                                                          
    main()                                    
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/bin/.aws_completer-wrapped", line 29, in main                                                                                                                              
    autocomplete(command_line, command_index)                                                                          
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/main.py", line 61, in autocomplete     
    results = completer.autocomplete(command_line, position)
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/completer.py", line 42, in autocomplete                                                                                    
    parsed = self._parser.parse(command_line, index)                                                                   
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/parser.py", line 145, in parse                                                                                             
    global_args = self._index.arg_names(lineage=[], command_name='aws')
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/local/model.py", line 104, in arg_names                                                                                    
    results = db.execute(self._ARG_NAME_QUERY,    
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/db.py", line 33, in execute       
    return self._connection.execute(query, kwargs)                                                                     
  File "/nix/store/rscxkjs268qr4cjv0lzlmdcphwxp4g4h-awscli2-2.0.46/lib/python3.8/site-packages/awscli/autocomplete/db.py", line 23, in _connection        
    self._db_conn = sqlite3.connect(                
sqlite3.OperationalError: unable to open database file

Additional context
Add any other context about the problem here.

Notify maintainers

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.74, NixOS, 20.09.1632.a6a3a368dda (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@qrevel qrevel added the 0.kind: bug Something is broken label Nov 13, 2020
@qrevel qrevel mentioned this issue Nov 13, 2020
10 tasks
qrevel added a commit to qrevel/nixpkgs that referenced this issue Nov 21, 2020
peterhoeg pushed a commit that referenced this issue Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant