Skip to content

Commit

Permalink
fix env var reading at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Feb 20, 2024
1 parent 69d449d commit beb59d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hayhooks/cli/run/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
@click.command()
@click.option('--host', default="localhost")
@click.option('--port', default=1416)
@click.option('--pipelines-dir', default="pipelines.d")
@click.option('--pipelines-dir', default=os.environ.get("HAYHOOKS_PIPELINES_DIR"))
def run(host, port, pipelines_dir):
if not pipelines_dir:
pipelines_dir = "pipelines.d"
os.environ["HAYHOOKS_PIPELINES_DIR"] = pipelines_dir
uvicorn.run("hayhooks.server:app", host=host, port=port)

0 comments on commit beb59d5

Please sign in to comment.