Skip to content

Commit 2ee30fe

Browse files
Add kup update as alias for kup install (#128)
Co-authored-by: Tamás Tóth <tothtamas28@users.noreply.github.com>
1 parent f60bf14 commit 2ee30fe

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/kup/__main__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,14 @@ def main() -> None:
888888
)
889889
install.add_argument('-h', '--help', action=_HelpInstallAction)
890890

891+
update = subparser.add_parser(
892+
'update',
893+
help='update the stated package (alias of install)',
894+
add_help=False,
895+
parents=[verbose_arg, shared_args],
896+
)
897+
update.add_argument('-h', '--help', action=_HelpInstallAction)
898+
891899
uninstall = subparser.add_parser(
892900
'uninstall', help="remove the given package from the user's PATH", parents=[verbose_arg]
893901
)
@@ -966,7 +974,7 @@ def main() -> None:
966974
if args.command == 'list':
967975
list_package(package_name.base, args.inputs, args.status, args.version)
968976

969-
elif args.command == 'install':
977+
elif args.command in ['install', 'update']:
970978
install_package(package_name, args.version, args.override)
971979
elif args.command == 'uninstall':
972980
uninstall_package(package_name.base)

0 commit comments

Comments
 (0)