Dynamically find path of markdown-toc executable

This commit is contained in:
Dan Buch 2016-06-18 16:20:29 -04:00
parent 8eaf6be8fa
commit dec06d2837
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

View File

@ -94,7 +94,8 @@ def _migrations():
@_target @_target
def _toc(): def _toc():
_run(['node_modules/.bin/markdown-toc', '-i', 'README.md']) npm_bindir = check_output(['npm', 'bin']).strip()
_run(['node', os.path.join(npm_bindir, 'markdown-toc'), '-i', 'README.md'])
_run(['git', 'diff', '--quiet']) _run(['git', 'diff', '--quiet'])