Improve meteor-installer:

- Change warning message, process.getguid is not reliable when not using --unsafe-perm
This commit is contained in:
Renan Castro
2021-11-10 15:05:35 -03:00
committed by filipenevola
parent e8dccac909
commit 899ecfd243
2 changed files with 10 additions and 8 deletions

View File

@@ -58,13 +58,15 @@ let tempDirObject;
try{
tempDirObject = tmp.dirSync();
} catch(e){
console.error("****************************")
console.error("Couldn't create tmp dir for extracting meteor.")
if(isRoot()){
console.error("-- \tYou are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.\t --")
}else {
console.error("-- \tA possible cause is that you might not have enough space in disk or permission to create folders\t --")
}
console.error("****************************");
console.error("Couldn't create tmp dir for extracting meteor.");
console.error("There are 2 possible causes:");
console.error(
'\t1. You are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.'
);
console.error(
'\t2. You might not have enough space in disk or permission to create folders'
);
console.error("****************************")
process.exit(1);
}

View File

@@ -1,6 +1,6 @@
{
"name": "meteor",
"version": "2.5.1-beta.4",
"version": "2.5.1-beta.5",
"description": "Install Meteor on Windows",
"main": "install.js",
"scripts": {