1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

properly fail if config not found (#287)

This commit is contained in:
deadc0de6
2020-11-08 13:48:05 +01:00
parent a49bc9762c
commit 8ec7243f30

View File

@@ -17,6 +17,7 @@ from dotdrop.logger import Logger
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
from dotdrop.action import Action
from dotdrop.utils import uniq_list
from dotdrop.exceptions import YamlException
ENV_PROFILE = 'DOTDROP_PROFILE'
ENV_CONFIG = 'DOTDROP_CONFIG'
@@ -123,6 +124,8 @@ class Options(AttrMonitor):
self.debug = False
self.profile = self.args['--profile']
self.confpath = self._get_config_path()
if not self.confpath:
raise YamlException('no config file found')
if self.debug:
self.log.dbg('version: {}'.format(VERSION))
self.log.dbg('command: {}'.format(' '.join(sys.argv)))