Skip to content

Commit

Permalink
dep!: bump which@3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Mar 27, 2023
1 parent 784a2d0 commit a07f343
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 83 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

const pify = require('pify');
const which = pify(require('which'));
const which = require('which');
const path = require('path');
const fs = require('fs-extra');
const { CordovaError, events, superspawn } = require('cordova-common');
Expand Down Expand Up @@ -124,9 +124,11 @@ async function resolvePathToPackage (name, basedir) {
* @return {Promise<string>} Absolute path to npm.
*/
async function isNpmInstalled () {
return which('npm').catch(_ => {
try {
return await which('npm');
} catch (e) {
throw new CordovaError('"npm" command line tool is not installed: make sure it is accessible on your PATH.');
});
}
}

module.exports.isNpmInstalled = isNpmInstalled;
Expand Down
158 changes: 79 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"pify": "^5.0.0",
"resolve": "^1.22.1",
"semver": "^7.3.8",
"which": "^2.0.2"
"which": "^3.0.0"
},
"devDependencies": {
"@cordova/eslint-config": "^3.0.0",
Expand Down

0 comments on commit a07f343

Please sign in to comment.