cmds.distro.CmdInstall: Support macro expansion

Support macro expansion similar to CmdCopy paths in CmdInstall as
well.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-16 14:19:18 +02:00
commit beab4cb03c

View file

@ -14,6 +14,9 @@ class CmdInstall(Cmd): # export
super().add_arguments(parser) super().add_arguments(parser)
parser.add_argument("names", nargs="*", help="Packages to be installed") parser.add_argument("names", nargs="*", help="Packages to be installed")
parser.add_argument('--only-update', default=False, action='store_true', help='Only update the listed packages, don\'t install them') parser.add_argument('--only-update', default=False, action='store_true', help='Only update the listed packages, don\'t install them')
parser.add_argument('-F', '--fixed-strings', action='store_true',
help='Don\'t expand platform info macros in <names>')
async def _run(self, args: Namespace) -> None: async def _run(self, args: Namespace) -> None:
return await self.distro.install(args.names, only_update=args.only_update) names = names if args.fixed_strings else self.app.distro_info(args.names)
return await self.distro.install(names, only_update=args.only_update)