Skip to content

Commit

Permalink
always ask config folder, always reset node paths on init
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 25, 2016
1 parent b8e79a0 commit 7b86584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function initPrompts(newProject) {
})
// jspm config folder
.then(function() {
if (promptType == 'custom' || promptType == 'quick')
if (promptType == 'custom')
return;

// to make the prompts simple, we assume the config files are called jspm.config.js and
Expand Down
8 changes: 3 additions & 5 deletions lib/config/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,15 @@ Object.defineProperty(JspmSystemConfig.prototype, 'nodePackagesURL', {
},
set: function(packagesURL) {
var self = this;
var curPackagesURL = this.nodePackagesURL;

if (packagesURL[packagesURL.length - 1] != path.sep)
packagesURL += path.sep;

// if node registry paths was null, bring it back
this.nodeRegistryPaths = this.nodeRegistryPaths || {};
Object.keys(this.nodeRegistryPaths).forEach(function(path) {
var registryPath = getRegistryPath(path, self.nodeRegistryPaths[path]);
if (registryPath && registryPath.packagesURL + path.sep == curPackagesURL)
self.nodeRegistryPaths[path] = packagesURL + registryPath.name + path.sep;
Object.keys(this.nodeRegistryPaths).forEach(function(p) {
var registryPath = getRegistryPath(p, self.nodeRegistryPaths[p]);
self.nodeRegistryPaths[p] = packagesURL + registryPath.name + path.sep;
});
// ensure all packageConfig registry paths
var packageConfigPaths = this.file.getValue(['packageConfigPaths'], 'array');
Expand Down

0 comments on commit 7b86584

Please sign in to comment.