Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions library/visual_studio_code_install_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def install_extension(module, executable, name):
# found)
rc, out, err = module.run_command(
[executable, '--install-extension', name, '--force'])
# Whitelist: [DEP0005] DeprecationWarning: Buffer() is deprecated due
# to security and usability issues.
if rc != 0 or (err and '[DEP0005]' not in err):
if rc != 0 or (err and any(e in err for e in ['Failed Installing Extensions:', 'Error while installing extensions:'])):
module.fail_json(
msg='Error while upgrading extension [%s]: (%d) %s' %
(name, rc, out + err))
Expand All @@ -55,9 +53,7 @@ def install_extension(module, executable, name):
else:
rc, out, err = module.run_command(
[executable, '--install-extension', name])
# Whitelist: [DEP0005] DeprecationWarning: Buffer() is deprecated due
# to security and usability issues.
if rc != 0 or (err and '[DEP0005]' not in err):
if rc != 0 or (err and any(e in err for e in ['Failed Installing Extensions:', 'Error while installing extensions:'])):
module.fail_json(
msg='Error while installing extension [%s]: (%d) %s' %
(name, rc, out + err))
Expand Down