fix #1017 support for README.md at mojit level #1198

Merged
merged 4 commits into from Jul 22, 2013

Projects

None yet

2 participants

@lzhan

No description provided.

@caridy caridy commented on the diff Jul 17, 2013
lib/app/autoload/store.server.js
@@ -1824,6 +1824,10 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
res;
dir = this._libs.path.resolve(this._config.root, dir);
+ if (!this._libs.fs.lstatSync(dir).isDirectory()) {
@caridy
caridy Jul 17, 2013

how does this solves the issue? can you elaborate more?

@lzhan
lzhan Jul 17, 2013

The original implementation treats every thing under mojits dir as a mojit(dir), it tries to read files under the dir. When README.md file is put under mojits dir, parsing err is thrown. The fix check if it is dir, if it is not, just return, skip the loading process for mojit.

@caridy

+1

TODO:

  • history entry
  • unit test
@lzhan lzhan merged commit aba26fc into yahoo:develop Jul 22, 2013

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment