Skip to content

Commit 229290a

Browse files
committed
Support --prefix
1 parent b2d08f4 commit 229290a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dof/cli/root.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,17 @@ def user_specs(
5353
None,
5454
help="uuid of the revision to inspect for user_specs"
5555
),
56+
prefix: str = typer.Option(
57+
None,
58+
help="prefix to save"
59+
),
5660
):
5761
"""Demo command: output the list of user requested specs for a revision"""
58-
prefix = os.environ.get("CONDA_PREFIX")
62+
if prefix is None:
63+
prefix = os.environ.get("CONDA_PREFIX")
64+
else:
65+
prefix = os.path.abspath(prefix)
66+
5967
if rev is None:
6068
meta = CondaMeta(prefix=prefix)
6169
specs = meta.get_requested_specs()

0 commit comments

Comments
 (0)