mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
parent
8a3c511a04
commit
244f60d6cd
@ -49,7 +49,7 @@ def run(args: List) -> int:
|
|||||||
|
|
||||||
def extract_config_dir(args=None) -> str:
|
def extract_config_dir(args=None) -> str:
|
||||||
"""Extract the config dir from the arguments or get the default."""
|
"""Extract the config dir from the arguments or get the default."""
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser(add_help=False)
|
||||||
parser.add_argument('-c', '--config', default=None)
|
parser.add_argument('-c', '--config', default=None)
|
||||||
args = parser.parse_known_args(args)[0]
|
args = parser.parse_known_args(args)[0]
|
||||||
return (os.path.join(os.getcwd(), args.config) if args.config
|
return (os.path.join(os.getcwd(), args.config) if args.config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user