mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Fix composer require
completion
When no development dependencies are installed, the completion would crash with: KeyError: 'require-dev'
This commit is contained in:
parent
bda9d57417
commit
9e223577aa
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ import json
|
|||
json_data = open('composer.json')
|
||||
data = json.load(json_data)
|
||||
json_data.close()
|
||||
packages = itertools.chain(data['require'].keys(), data['require-dev'].keys())
|
||||
packages = itertools.chain(data.get('require', {}).keys(), data.get('require-dev', {}).keys())
|
||||
print(\"\n\".join(packages))
|
||||
" | $python -S
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue