Skip to content

Commit

Permalink
Merge pull request #4203 from pypeclub/feature/default_cli_for_headless
Browse files Browse the repository at this point in the history
General: Default command for headless mode is interactive
  • Loading branch information
iLLiCiTiT committed Dec 13, 2022
2 parents 9a317b1 + b05bcf9 commit ad9f185
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openpype/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ def main(ctx):
It wraps different commands together.
"""

if ctx.invoked_subcommand is None:
ctx.invoke(tray)
# Print help if headless mode is used
if os.environ.get("OPENPYPE_HEADLESS_MODE") == "1":
print(ctx.get_help())
sys.exit(0)
else:
ctx.invoke(tray)


@main.command()
Expand Down

0 comments on commit ad9f185

Please sign in to comment.