Skip to content

Commit

Permalink
fix(install): handle error when trying to create symlink on Windows a…
Browse files Browse the repository at this point in the history
…s non-Administrator
  • Loading branch information
ayushmanchhabra committed Feb 5, 2024
1 parent 5f0559d commit aca09ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/install.js
Expand Up @@ -12,8 +12,12 @@ const semver = require('semver');
const nodeManifest = require('../package.json');

install()
.then(() => {})
.catch((error) => console.error(error));
.catch((error) => {
if (error.code === 'EPERM') {
console.error('Unable to create symlink since user did not run as Administrator.');
exit(1);
}
});

async function install() {

Expand Down

0 comments on commit aca09ab

Please sign in to comment.