fix(extensions): preserve existing global packages

This commit is contained in:
Julian lechner committed 2026-09-24 17:10:02 +02:00
1 parent 46d07e578d
commit eeb437e234
3 files changed
+26 -6

No files matched your search

+2
View File
@@ -53,6 +53,8 @@ class ManagedExtensionTests(unittest.TestCase):
self.addCleanup(self.output.__exit__, None, None, None)
def command(self, args, summary, home=None):
if args[:2] == ['npm', 'list']:
return '{"dependencies":{}}'
self.commands.append(args)
if len(args) > 3 and args[2] in ('add', 'install') and args[1] == 'plugin':
self.installed[args[0]][args[3]] = {'scope': 'user'}