Skip to content

Commit

Permalink
Merged release/1.3.7 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Mathes committed Dec 17, 2016
2 parents a5e80ce + 06e319b commit 09b28db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions lib/minstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ function run() {
moduletools.setNullTarget('NUL');
}

let installedModules;
let moduleInfos;
checkStartConditions()
.then(() => {
return Promise.all([
Expand All @@ -243,8 +245,8 @@ function run() {
]);
})
.then((modules) => {
const installedModules = modules[0];
const moduleInfos = modules[1];
installedModules = modules[0];
moduleInfos = modules[1];
if (moduleInfos.length === 0) {
throw new UncriticalError('no modules found, thus minstall is done :)');
}
Expand All @@ -254,6 +256,11 @@ function run() {
moduleText = 'module';
}
logIfInRoot(`minstall found ${moduleInfos.length} local ${moduleText} in '${moduletools.modulesFolder}'`);
return Promise.all(moduleInfos.map((moduleInfo) => {
return systools.delete(path.join(process.cwd(), 'node_modules', moduleInfo.folderName));
}));
})
.then(() => {
return installModules(installedModules, moduleInfos);
})
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion lib/systools.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const systools = {
}

if (stderr) {
return reject(new Error(`\nA command from within minstall produced a warning or an error:\ncommand: ${command}\nmessage:\n${stderr}\n`));
return reject(new Error(`\nA command from within minstall produced a warning or an error:\ncommand: ${command}\nlog-output:\n${stdout}\n\nmessage:\n${stderr}\n`));
}

if (stdout.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minstall",
"version": "1.3.6",
"version": "1.3.7",
"description": "local module installer",
"main": "lib/minstall.js",
"bin": "lib/minstall.js",
Expand Down

0 comments on commit 09b28db

Please sign in to comment.