Skip to content

Commit

Permalink
Read default value for vardir option from env
Browse files Browse the repository at this point in the history
Now the default value for the `vardir` option is taken from the `VARDIR`
env variable when it is defined.
  • Loading branch information
ylobankov committed Apr 27, 2022
1 parent 3d7acfc commit d913d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/options.py
Expand Up @@ -256,7 +256,7 @@ def __init__(self):
parser.add_argument(
"--vardir",
dest="vardir",
default='/tmp/t',
default=os.environ.get('VARDIR') or '/tmp/t',
help=format_help(
"""
Path to data directory.
Expand All @@ -265,7 +265,7 @@ def __init__(self):
where all tests reside. **NOT** a current directory of a
parent shell.
Default: /tmp/t.
Default: ${VARDIR} or /tmp/t.
"""))

parser.add_argument(
Expand Down

0 comments on commit d913d78

Please sign in to comment.