mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-07 07:40:44 +00:00
fail early when profile does not exist (#300)
This commit is contained in:
@@ -95,6 +95,16 @@ class Updater:
|
||||
dtpath = os.path.join(self.dotpath, dotfile.src)
|
||||
dtpath = os.path.expanduser(dtpath)
|
||||
|
||||
if not os.path.exists(path):
|
||||
msg = '\"{}\" does not exist'
|
||||
self.log.err(msg.format(path))
|
||||
return False
|
||||
|
||||
if not os.path.exists(dtpath):
|
||||
msg = '\"{}\" does not exist, import it first'
|
||||
self.log.err(msg.format(dtpath))
|
||||
return False
|
||||
|
||||
if self._ignore([path, dtpath]):
|
||||
self.log.sub('\"{}\" ignored'.format(dotfile.key))
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user