force specification of version number
this is cause gitea doesn't allow you to just grab the latest version of packages
This commit is contained in:
@@ -12,7 +12,7 @@ from util import check_ground_libs_path, check_sudo
|
|||||||
console = Console()
|
console = Console()
|
||||||
|
|
||||||
|
|
||||||
def install_package(package_name, version, args):
|
def install_package(package_name, version, args):
|
||||||
retries_left = args.max_retries
|
retries_left = args.max_retries
|
||||||
|
|
||||||
with console.status("Downloading tarball...", spinner="bouncingBall", spinner_style="blue") as status:
|
with console.status("Downloading tarball...", spinner="bouncingBall", spinner_style="blue") as status:
|
||||||
@@ -80,10 +80,13 @@ def install(args):
|
|||||||
for package in args.names:
|
for package in args.names:
|
||||||
# figure out which version to install
|
# figure out which version to install
|
||||||
package_name = package
|
package_name = package
|
||||||
version = "latest"
|
version = "1.0.0"
|
||||||
if "@" in package:
|
if "@" in package:
|
||||||
split = package.split("@")
|
split = package.split("@")
|
||||||
package_name = split[0]
|
package_name = split[0]
|
||||||
version = split[1]
|
version = split[1]
|
||||||
|
else:
|
||||||
|
console.print(f"[b red]digpkg: failed to install package: please specify version to install for {package_name}[/]")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
install_package(package_name, version, args)
|
install_package(package_name, version, args)
|
||||||
Reference in New Issue
Block a user