Putting a README.md in the mojits/ directory causes mojito to not load #1017

Closed
gotwarlost opened this Issue Mar 1, 2013 · 4 comments

Projects

None yet

3 participants

@gotwarlost
Yahoo Inc. member
$ touch mojits/README.md
$ ./node_modules/mojito/bin/mojito start --context environment:development
info: (mojito-resource-store): Store initialized
info: (mojito-resource-store): Store initialized

/tmp/ui/node_modules/mojito/lib/app/addons/rs/config.js:149
                            throw new Error("Error parsing file: " + fullPath 
                                  ^
Error: Error parsing file: /tmp/ui/mojits/README.md/definition.json

Not a big deal but a bug all the same.

@gotwarlost
Yahoo Inc. member

Note how it thinks that README.md is a directory. If this is common code, this bug may have other subtler manifestations.

@drewfish
Yahoo Inc. member

Looks like a bug in the resource store.

@drewfish drewfish was assigned Mar 21, 2013
@drewfish
Yahoo Inc. member

I think the fix entails added a check in lib/app/autoload/store.server.js _preloadDirMojit() to make sure that the dir argument is actually a directory (and just return if it isn't).

@lzhan lzhan closed this in aba26fc Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment