From 8cfdccbf0fbec9c3badb8745f2e0cf17d27e5ec5 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 18 Jun 2016 16:37:11 -0400 Subject: [PATCH] More tweaks to how `./runtests toc` runs on Windows --- appveyor.yml | 4 +--- runtests | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 353a28e..90de4d5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,9 +21,7 @@ install: - git clone . c:\gopath\src\gopkg.in\urfave\cli.v2 - go get github.com/urfave/gfmxr/... - go get -v -t ./... -- npm bin -- ps: $MarkdownTocExists = Test-Path node_modules\.bin\markdown-toc -- ps: if ($MarkdownTocExists -eq $False) { cmd /c npm install markdown-toc } +- if not exist node_modules\.bin\markdown-toc npm install markdown-toc build_script: - python runtests vet diff --git a/runtests b/runtests index e762074..d531588 100755 --- a/runtests +++ b/runtests @@ -94,8 +94,10 @@ def _migrations(): @_target def _toc(): - npm_bindir = check_output(['npm', 'bin']).strip() - _run(['node', os.path.join(npm_bindir, 'markdown-toc'), '-i', 'README.md']) + _run([ + 'node', os.path.join('node_modules', '.bin', 'markdown-toc'), + '-i', 'README.md' + ]) _run(['git', 'diff', '--quiet'])