feat(install): add --legacy-name flag

This commit is contained in:
Duologic 2022-04-04 11:00:00 +02:00
parent 3aec759b6a
commit 9e45e0a43d
2 changed files with 13 additions and 3 deletions

View file

@ -59,6 +59,7 @@ func Main() int {
installCmd := a.Command(installActionName, "Install new dependencies. Existing ones are silently skipped")
installCmdURIs := installCmd.Arg("uris", "URIs to packages to install, URLs or file paths").Strings()
installCmdSingle := installCmd.Flag("single", "install package without dependencies").Short('1').Bool()
installCmdLegacyName := installCmd.Flag("legacy-name", "set legacy name").String()
updateCmd := a.Command(updateActionName, "Update all or specific dependencies.")
updateCmdURIs := updateCmd.Arg("uris", "URIs to packages to update, URLs or file paths").Strings()
@ -83,13 +84,13 @@ func Main() int {
case initCmd.FullCommand():
return initCommand(workdir)
case installCmd.FullCommand():
return installCommand(workdir, cfg.JsonnetHome, *installCmdURIs, *installCmdSingle)
return installCommand(workdir, cfg.JsonnetHome, *installCmdURIs, *installCmdSingle, *installCmdLegacyName)
case updateCmd.FullCommand():
return updateCommand(workdir, cfg.JsonnetHome, *updateCmdURIs)
case rewriteCmd.FullCommand():
return rewriteCommand(workdir, cfg.JsonnetHome)
default:
installCommand(workdir, cfg.JsonnetHome, []string{}, false)
installCommand(workdir, cfg.JsonnetHome, []string{}, false, "")
}
return 0