Skip to content

Commit

Permalink
fix: specify commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
sko00o committed Nov 17, 2024
1 parent b2ba7d0 commit 0a3185c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,14 @@ def entry(
# logging.info(f"scan_dir took {end_time - start_time:.2f} seconds to run")


def validate_commit_and_version(commit: Optional[str], ctx: typer.Context):
def validate_commit_and_version(commit: Optional[str], ctx: typer.Context) -> Optional[str]:
"""
Validate that the commit is not specified unless the version is 'nightly'.
"""
version = ctx.params.get("version")
if commit and version != "nightly":
raise typer.BadParameter("You can only specify the commit if the version is 'nightly'.")
return commit


@app.command(help="Download and install ComfyUI and ComfyUI-Manager")
Expand Down

0 comments on commit 0a3185c

Please sign in to comment.