Skip to content

Commit

Permalink
Make nox -s run emit a helpful error if no command invocation is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Sep 24, 2024
1 parent 9dca84e commit 23eba15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ def build_help(session):


def _run(session):
"""Run an arbitrary command in the project's venv."""
session.run(*session.posargs[1:])
"""Run an arbitrary command invocation in the project's venv."""
posargs = session.posargs[1:]
if not posargs:
session.error("Must pass a command invocation to run")
session.run(*posargs)


@nox.session()
Expand Down

0 comments on commit 23eba15

Please sign in to comment.