mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
NPM install latest made more effecient
`npm install` is smart enough to only update updated modules. Checking for `outdated` and running `update` repeats the same process 2x.
This commit is contained in:
@@ -209,12 +209,7 @@ def main():
|
||||
changed = True
|
||||
npm.install()
|
||||
elif state == 'latest':
|
||||
installed, missing = npm.list()
|
||||
outdated = npm.list_outdated()
|
||||
if len(missing) or len(outdated):
|
||||
changed = True
|
||||
npm.install()
|
||||
npm.update()
|
||||
npm.install()
|
||||
else: #absent
|
||||
installed, missing = npm.list()
|
||||
if name in installed:
|
||||
|
||||
Reference in New Issue
Block a user