ekaragodin/create-from

Asynchronous function calls are simultaneous

Closed this issue · 0 comments

create-from/cli.js

Lines 12 to 14 in 9434dfe

mkdir(to)
.then(download({ from, to }))
.then(install({ to }));

download() and install() both return a promise, but Promise.prototype.then should not be called with another promise as argument, it would expect an asynchronous function which return a promise.

So download() and install() are actually called simultaneously and the install might not work since the download is not yet complete.