facebookarchive / codemod

Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention. Codemod was developed at Facebook and released as open source.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails with backtrace on permission denied.

gms8994 opened this issue · comments

Traceback (most recent call last):
File "./codemod.py", line 795, in
run_interactive(**options)
File "./codemod.py", line 141, in run_interactive
_ask_about_patch(patch, editor)
File "./codemod.py", line 578, in _ask_about_patch
_save(patch.path, lines)
File "./codemod.py", line 602, in _save
file_w = open(path, 'w')
IOError: [Errno 13] Permission denied: '/path/to/file.inc'

It should handle this error gracefully, and continue. (or, potentially, not "see" files that cannot be written to).

I accept pull requests :)