mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-11 12:55:27 +08:00
Fix composer require
completion
When no development dependencies are installed, the completion would crash with: KeyError: 'require-dev' (cherry picked from commit 9e223577aa95ea56b0907035bb50bbba5ae47d24)
This commit is contained in:
parent
4e731123b5
commit
8727a7f9e3
@ -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…
x
Reference in New Issue
Block a user