mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-12 01:18:59 +00:00
properly fail if config not found (#287)
This commit is contained in:
@@ -17,6 +17,7 @@ from dotdrop.logger import Logger
|
|||||||
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
|
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
|
||||||
from dotdrop.action import Action
|
from dotdrop.action import Action
|
||||||
from dotdrop.utils import uniq_list
|
from dotdrop.utils import uniq_list
|
||||||
|
from dotdrop.exceptions import YamlException
|
||||||
|
|
||||||
ENV_PROFILE = 'DOTDROP_PROFILE'
|
ENV_PROFILE = 'DOTDROP_PROFILE'
|
||||||
ENV_CONFIG = 'DOTDROP_CONFIG'
|
ENV_CONFIG = 'DOTDROP_CONFIG'
|
||||||
@@ -123,6 +124,8 @@ class Options(AttrMonitor):
|
|||||||
self.debug = False
|
self.debug = False
|
||||||
self.profile = self.args['--profile']
|
self.profile = self.args['--profile']
|
||||||
self.confpath = self._get_config_path()
|
self.confpath = self._get_config_path()
|
||||||
|
if not self.confpath:
|
||||||
|
raise YamlException('no config file found')
|
||||||
if self.debug:
|
if self.debug:
|
||||||
self.log.dbg('version: {}'.format(VERSION))
|
self.log.dbg('version: {}'.format(VERSION))
|
||||||
self.log.dbg('command: {}'.format(' '.join(sys.argv)))
|
self.log.dbg('command: {}'.format(' '.join(sys.argv)))
|
||||||
|
|||||||
Reference in New Issue
Block a user