Skip to content

Commit

Permalink
fix: yarn detection with nps (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
aohua authored and tricoder42 committed Jan 25, 2019
1 parent caccfe6 commit 62c8cc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/api/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ try {
} catch (e) {
commands = ["run"]
}
const isYarn = process.env.npm_config_user_agent.includes("yarn")
const isYarn =
process.env.npm_config_user_agent &&
process.env.npm_config_user_agent.includes("yarn")
const preCommand = [isYarn ? "yarn" : "npm", ...commands].join(" ")

0 comments on commit 62c8cc0

Please sign in to comment.