use npx to run the package instead of npm installing it

This commit is contained in:
Ajitem Sahasrabuddhe 2020-01-13 10:52:14 +05:30
parent 0b3b172855
commit 3e125a1865
2 changed files with 1 additions and 2 deletions

View File

@ -44,7 +44,6 @@ jobs:
mkdir -p $GOPATH/bin
curl -L -o $GOPATH/bin/gfmrun "https://github.com/urfave/gfmrun/releases/download/v1.2.14/gfmrun-$(go env GOOS)-amd64-v1.2.14"
chmod +x $GOPATH/bin/gfmrun
npm install markdown-toc
- name: Run Tests
run: |

View File

@ -166,7 +166,7 @@ func TocActionFunc(c *cli.Context) error {
filename = "README.md"
}
err := runCmd("node_modules/.bin/markdown-toc", "-i", filename)
err := runCmd("npx markdown-toc", "-i", filename)
if err != nil {
return err
}