alichtman / shallow-backup

Git-integrated backup tool for macOS and Linux devs.
MIT License
1.21k stars 247 forks source link

Uncaught `shutil.Error` if file is not found during backup #298

Closed alichtman closed 2 years ago

alichtman commented 2 years ago
Backing up dotfolders...
Process Process-10:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/shallow_backup/utils.py", line 187, in copy_dir_if_valid
    copytree(source_dir, backup_path, symlinks=False)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/shutil.py", line 565, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/shutil.py", line 521, in _copytree
    raise Error(errors)
shutil.Error: [('/Users/alichtman/.config/zsh/.zinit/completions/_flameshot', '/Users/alichtman/shallow-backup/dotfiles/.config/zsh/.zinit/completions/_flameshot', "[Errno 2] No such file or directory: '/Users/alichtman/.config/zsh/.zinit/completions/_flameshot'")]

If should print File / Directory not found: PATH in red.