Skip to content

Commit

Permalink
Support --conf as abbreviation for --config
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Sep 30, 2015
1 parent ea8e0ba commit 1227e96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions did/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ def path():
directory = CONFIG
# Detect config file (even before options are parsed)
filename = "config"
arguments = " ".join(sys.argv)
if "--config" in arguments:
matched = re.search("--config[ =](\S+)", arguments)
if matched:
filename = matched.groups()[0]
matched = re.search("--confi?g?[ =](\S+)", " ".join(sys.argv))
if matched:
filename = matched.groups()[0]
return directory.rstrip("/") + "/" + filename

@staticmethod
Expand Down

0 comments on commit 1227e96

Please sign in to comment.