jlord / offline-issues

:grey_exclamation: :signal_strength: Get your GitHub Issues to read offline later. Mmm.
Other
640 stars 68 forks source link

Windows pathnames. #36

Open pinuke opened 8 years ago

pinuke commented 8 years ago

It would be a good idea to remind people to not use the Windows pathname structure when pulling the issues. otherwise this error is produced:

offline-issues JavaScriptAI\regex.objectified (for example, produces the below error):

C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\src\index.js:32
      if (userAndRepo[1].indexOf('#') >= 0) {
                        ^

TypeError: Cannot read property 'indexOf' of undefined
    at C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\src\index.js:32:25
    at Array.forEach (native)
    at parseRepo (C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\src\index.js:27:15)
    at module.exports (C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\src\index.js:22:3)
    at C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\src\cli.js:35:3
    at afterConfigRead (C:\Users\Nick\AppData\Roaming\npm\node_modules\offline-issues\node_modules\ghauth\ghauth.js:142:14)
    at C:\Users\******\AppData\Roaming\npm\node_modules\offline-issues\node_modules\ghauth\node_modules\application-config\index.js:22:5
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

I would remind Windows users not to use the "\" and instead use the "/"

(offline-issues JavaScriptAI\regex.objectified as opposed to offline-issues JavaScriptAI/regex.objectified)

pinuke commented 8 years ago

It's an easy fix. Just console.log a warning on line 30 if using the "\", and change the "\" to a "/"

pinuke commented 8 years ago

Will provide my own fix later, if needed