Optionally Update gadget config rather than repolace
This commit is contained in:
parent
dc3deadb26
commit
36253e58ce
1 changed files with 11 additions and 1 deletions
|
|
@ -576,6 +576,11 @@ parser.add_argument( '--no-gadget-config',
|
|||
action = 'store_true',
|
||||
help = "Don't write the .gagets.json, just install" )
|
||||
|
||||
parser.add_argument( '--update-gadget-config',
|
||||
action = 'store_true',
|
||||
help =
|
||||
"Update the gadget config rather than overwrite it" )
|
||||
|
||||
parser.add_argument( '--enable-custom',
|
||||
dest='custom_gadget_file',
|
||||
action='append',
|
||||
|
|
@ -657,7 +662,12 @@ for custom_file_name in functools.reduce( operator.add,
|
|||
|
||||
|
||||
failed = []
|
||||
all_adapters = {}
|
||||
if args.update_gadget_config:
|
||||
with open( install.GetGadgetConfigFile( vimspector_base ), 'r' ) as f:
|
||||
all_adapters = json.load( f ).get( 'adapters', {} )
|
||||
else:
|
||||
all_adapters = {}
|
||||
|
||||
for name, gadget in GADGETS.items():
|
||||
if not gadget.get( 'enabled', True ):
|
||||
if ( not args.force_all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue