Explicitly run markdown-toc with bash on Windows

main
Dan Buch 8 years ago
parent 8cfdccbf0f
commit 77722a46e1
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

@ -4,6 +4,7 @@ from __future__ import print_function
import argparse
import glob
import os
import platform
import shutil
import sys
import tempfile
@ -11,6 +12,7 @@ import tempfile
from subprocess import check_call, check_output
_WINDOWS = platform.system().lower() == 'windows'
_PACKAGE_NAME = os.environ.get(
'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
)
@ -94,8 +96,9 @@ def _migrations():
@_target
def _toc():
_run([
'node', os.path.join('node_modules', '.bin', 'markdown-toc'),
exe = ['bash'] if _WINDOWS else []
_run(exe + [
os.path.join('node_modules', '.bin', 'markdown-toc'),
'-i', 'README.md'
])
_run(['git', 'diff', '--quiet'])

Loading…
Cancel
Save