mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix crash with an empty programs/foo dir
We should never use the existence of a directory in our source tree to make a decision, because git doesn't track directory existence, and it's easy to end up with extraneous directories (containing gitignored files, eg). So we should ignore programs/foo directories in apps if they don't contain package.js.
This commit is contained in:
@@ -1675,6 +1675,16 @@ exports.bundle = function (appDir, outputPath, options) {
|
||||
// Recover by ignoring this program
|
||||
return;
|
||||
}
|
||||
// Programs must (for now) contain a `package.js` file. If not, then
|
||||
// perhaps the directory we are seeing is left over from another git
|
||||
// branch or something and we should ignore it. We don't actually parse
|
||||
// the package.js file here, though (but we do restart if it is later
|
||||
// added or changed).
|
||||
if (watch.readAndWatchFile(
|
||||
watchSet, path.join(programsDir, item, 'package.js')) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
targets[item] = true; // will be overwritten with actual target later
|
||||
|
||||
// Read attributes.json, if it exists
|
||||
|
||||
Reference in New Issue
Block a user