montagejs / minit

Tool: Helps you build Montage applications by generating template applications and components for you.
Other
8 stars 22 forks source link

finishing package installation does not scrutinize "success" #48

Closed mczepiel closed 6 years ago

mczepiel commented 11 years ago

The argument provided to this response is not being scrutinized to se if there was actually successful installation of the expected dependencies in node_modules.

https://github.com/montagejs/minit/blob/master/templates/package.js#L46

In particular running the following code:

minitCreate = require("./lib/create").create,

minitCreate("digit", {name: "a", "packageHome": "tmpA"}).then(function (success) {
    minitCreate("digit", {name: "b", "packageHome": "tmpB"});    
}).done();

Yields wildly different looking "success" to the handler I linked to above. Indeed, in the latter case, instead of listing the dependencies that were installed you simply get back [ [], {}, '' ]

Perhaps worthy of another issue itself: if a single process invokes minit's create multiple times the config, or at least the prefix, is not used effectively. This may be a lower-level behavior of npm we need to address or workaround.

At the very least, we should report that the second create has failed to install any dependencies when it was expected to. (Not that I'm sure how to differentiate that from correctly not installing any dependencies where none were needed)