Add instruction on how to disable the monitor and switch to cmd_output_b

This commit is contained in:
Lena Wildervanck 2023-05-19 02:04:06 +02:00
parent c2deff948e
commit 0355349b81

View file

@ -53,12 +53,14 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
if (
(sys.platform == 'darwin' or sys.platform == 'win32') and
os.path.exists('./.git/fsmonitor--daemon.ipc') and
cmd_output('git', 'fsmonitor--daemon', 'status')[0] == 0
cmd_output_b('git', 'fsmonitor--daemon', 'status')[0] == 0
):
logger.warning(
'The fsmonitor daemon is running; '
'a bug in the fsmonitor daemon sometimes causes data loss '
'when running with pre-commit.',
'when running with pre-commit. '
'Its possible to disable it by running '
'`git config core.fsmonitor false`',
)
tree = cmd_output('git', 'write-tree')[1].strip()