Skip to content

Commit

Permalink
Handle npm auto-update empty file list
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Jan 25, 2018
1 parent fcc66a0 commit f14b66a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auto-update.js
Expand Up @@ -164,7 +164,10 @@ var processNewVersion = function (pkg, version) {
var updated = false;
_.each(npmFileMap, function (fileSpec) {
var basePath = fileSpec.basePath || '';

if (fileSpec.files.length === 0) {
fs.mkdirsSync(libPath);
return;
}
_.each(fileSpec.files, function (file) {
var libContentsPath = path.normalize(path.join(extractLibPath, basePath));
if (!isAllowedPath(libContentsPath)) {
Expand Down

0 comments on commit f14b66a

Please sign in to comment.