check if package exists
This commit is contained in:
@@ -2,6 +2,7 @@ from .console import print_error_message
|
||||
from .util import ensure_libs_env, comet_dir, get_package_index
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def install(args):
|
||||
@@ -22,4 +23,10 @@ def install(args):
|
||||
return
|
||||
|
||||
index = get_package_index()
|
||||
|
||||
package = index.get(name, None)
|
||||
if package == None:
|
||||
print_error_message(f"No package was found with the name \"{name}\"")
|
||||
sys.exit(1)
|
||||
|
||||
print(index)
|
||||
Reference in New Issue
Block a user