Skip to content

Commit

Permalink
Merge pull request #3495 from Unitech/module_install_windows
Browse files Browse the repository at this point in the history
fix: #3456 Make module installation work on windows.
  • Loading branch information
wallet77 authored Mar 2, 2018
2 parents a49287d + 4003ceb commit e9c625d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/API/Modules/Modularizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var shelljs = require('shelljs');
var path = require('path');
var fs = require('fs');
var os = require('os');
var async = require('async');
var p = path;
var readline = require('readline');
Expand Down Expand Up @@ -185,7 +186,7 @@ Modularizer.installModule = function(CLI, module_name, opts, cb) {
var install_path = path.join(cst.DEFAULT_MODULE_PATH, canonic_module_name);

mkdirp(install_path, function() {
process.chdir(process.env.HOME);
process.chdir(os.homedir());

var install_instance = spawn(cst.IS_WINDOWS ? 'npm.cmd' : 'npm', ['install', module_name, '--loglevel=error', '--prefix', install_path ], {
stdio : 'inherit',
Expand Down

0 comments on commit e9c625d

Please sign in to comment.