Skip to content
Snippets Groups Projects
Commit e3a59f48 authored by David Douard's avatar David Douard
Browse files

cli/db: properly handle the SWH_CONFIG_FILENAME in 'swh db init' command

parent 578fdc38
No related branches found
Tags v0.0.66
No related merge requests found
......@@ -6,7 +6,7 @@
import glob
import logging
from os import path
from os import path, environ
import subprocess
import warnings
......@@ -29,6 +29,8 @@ def db(ctx, config_file):
"""Software Heritage database generic tools.
"""
ctx.ensure_object(dict)
if config_file is None:
config_file = environ.get('SWH_CONFIG_FILENAME')
cfg = config_read(config_file)
ctx.obj["config"] = cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment