From e4e6621bbd6db8e099b5181598a0c83d80e4f934 Mon Sep 17 00:00:00 2001 From: Kazunori Sakamoto Date: Mon, 22 Dec 2014 09:52:16 +0900 Subject: [PATCH] Fix arguments of sed command for Mac OS. --- pre_commit_hooks/trailing_whitespace_fixer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit_hooks/trailing_whitespace_fixer.py b/pre_commit_hooks/trailing_whitespace_fixer.py index 20b08fe..3f100bb 100644 --- a/pre_commit_hooks/trailing_whitespace_fixer.py +++ b/pre_commit_hooks/trailing_whitespace_fixer.py @@ -20,7 +20,7 @@ def fix_trailing_whitespace(argv): if bad_whitespace_files: for bad_whitespace_file in bad_whitespace_files: print('Fixing {0}'.format(bad_whitespace_file)) - local['sed']['-i', '-e', 's/[[:space:]]*$//', bad_whitespace_file]() + local['sed']['-i', '', '-e', 's/[[:space:]]*$//', bad_whitespace_file]() return 1 else: return 0