mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
6685b4989e
commit
242bfd8c68
1 changed files with 1 additions and 6 deletions
|
@ -209,12 +209,7 @@ def main():
|
||||||
changed = True
|
changed = True
|
||||||
npm.install()
|
npm.install()
|
||||||
elif state == 'latest':
|
elif state == 'latest':
|
||||||
installed, missing = npm.list()
|
npm.install()
|
||||||
outdated = npm.list_outdated()
|
|
||||||
if len(missing) or len(outdated):
|
|
||||||
changed = True
|
|
||||||
npm.install()
|
|
||||||
npm.update()
|
|
||||||
else: #absent
|
else: #absent
|
||||||
installed, missing = npm.list()
|
installed, missing = npm.list()
|
||||||
if name in installed:
|
if name in installed:
|
||||||
|
|
Loading…
Reference in a new issue