Explicitly run markdown-toc with bash on Windows
This commit is contained in:
parent
8cfdccbf0f
commit
77722a46e1
7
runtests
7
runtests
@ -4,6 +4,7 @@ from __future__ import print_function
|
|||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -11,6 +12,7 @@ import tempfile
|
|||||||
from subprocess import check_call, check_output
|
from subprocess import check_call, check_output
|
||||||
|
|
||||||
|
|
||||||
|
_WINDOWS = platform.system().lower() == 'windows'
|
||||||
_PACKAGE_NAME = os.environ.get(
|
_PACKAGE_NAME = os.environ.get(
|
||||||
'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
|
'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
|
||||||
)
|
)
|
||||||
@ -94,8 +96,9 @@ def _migrations():
|
|||||||
|
|
||||||
@_target
|
@_target
|
||||||
def _toc():
|
def _toc():
|
||||||
_run([
|
exe = ['bash'] if _WINDOWS else []
|
||||||
'node', os.path.join('node_modules', '.bin', 'markdown-toc'),
|
_run(exe + [
|
||||||
|
os.path.join('node_modules', '.bin', 'markdown-toc'),
|
||||||
'-i', 'README.md'
|
'-i', 'README.md'
|
||||||
])
|
])
|
||||||
_run(['git', 'diff', '--quiet'])
|
_run(['git', 'diff', '--quiet'])
|
||||||
|
Loading…
Reference in New Issue
Block a user