From 3e125a186585dd767d925f497beae50103a49d2d Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 13 Jan 2020 10:52:14 +0530 Subject: [PATCH] use npx to run the package instead of npm installing it --- .github/workflows/cli.yml | 1 - build.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 89cd822..c47efc6 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -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: | diff --git a/build.go b/build.go index 325552c..9415568 100644 --- a/build.go +++ b/build.go @@ -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 }