prevent a crash when a package file specifies a name, but not a version

This commit is contained in:
Jeff Williams 2014-10-17 12:44:35 -07:00
parent 8d36936454
commit 25ffab0676

View File

@ -493,7 +493,7 @@ exports.publish = function(taffyData, opts, tutorials) {
// update outdir if necessary, then create outdir
var packageInfo = ( find({kind: 'package'}) || [] ) [0];
if (packageInfo && packageInfo.name) {
outdir = path.join(outdir, packageInfo.name, packageInfo.version);
outdir = path.join( outdir, packageInfo.name, (packageInfo.version || '') );
}
fs.mkPath(outdir);