Skip to content

Commit

Permalink
Fix setting of clean filter: call Python interpreter
Browse files Browse the repository at this point in the history
Otherwise setting the filter would point to the not executable pyc
file once nbstripout has been called and the filter would fail.
  • Loading branch information
kynan committed Nov 20, 2015
1 parent d5f8b40 commit 4159a46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nbstripout.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def install():
except CalledProcessError:
print('Installation failed: not a git repository!', file=sys.stderr)
sys.exit(1)
check_call(['git', 'config', 'filter.nbstripout.clean', "'%s'" % path.abspath(__file__)])
check_call(['git', 'config', 'filter.nbstripout.clean', '%s %s' %
(sys.executable, path.abspath(__file__))])
check_call(['git', 'config', 'filter.nbstripout.smudge', 'cat'])
check_call(['git', 'config', 'filter.nbstripout.required', 'true'])
attrfile = path.join(git_dir, 'info', 'attributes')
Expand Down

0 comments on commit 4159a46

Please sign in to comment.