handle no repo gracefully
Merge pull request #10 from lewang/fix-no-repo

handle no repo gracefully