Currently, if there are no outdated/discontinued MongoDB packages installed, we get this output:
Usage: pkg lock [-lqy] [-a|[-Cgix] ]
pkg lock --has-locked-packages
pkg unlock [-lqy] [-a|[-Cgix] ]
For more information see 'pkg help lock'.
Usage: pkg delete [-DfnqRy] [-Cgix] ...
pkg delete [-Dnqy] -a
This is due to the loop still running even if the $old_mongos variable is empty. My changes make it so the pkg unlock/delete commands only run if there are packages to delete.
Currently, if there are no outdated/discontinued MongoDB packages installed, we get this output:
This is due to the loop still running even if the
$old_mongos
variable is empty. My changes make it so the pkg unlock/delete commands only run if there are packages to delete.