diff --git a/jupyter_rstudio_singularity/cli.py b/jupyter_rstudio_singularity/cli.py index 938d499..c844df2 100644 --- a/jupyter_rstudio_singularity/cli.py +++ b/jupyter_rstudio_singularity/cli.py @@ -108,7 +108,7 @@ HOME = os.environ.get("HOME") USER = os.environ.get("USER") -app = typer.Typer() +cli = typer.Typer() def find_free_port(): @@ -216,7 +216,6 @@ def sanity_check_singularity_image( return True -@app.command() def main( remote_image: str = typer.Option( "docker://dabbleofdevops/r-tidyverse:4.2.2", @@ -269,5 +268,9 @@ def main( return 0 +def app(): + typer.run(cli()) + + if __name__ == "__main__": - sys.exit(main()) # pragma: no cover + sys.exit(app) # pragma: no cover diff --git a/setup.py b/setup.py index f49306a..1747127 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ description="Launch RStudio with Singularity from the command line.", entry_points={ "console_scripts": [ - "launch-rstudio=jupyter_rstudio_singularity.cli:main", + "launch-rstudio=jupyter_rstudio_singularity.cli:app", ], }, install_requires=requirements,