remote-origin-url icon indicating copy to clipboard operation
remote-origin-url copied to clipboard

Passing in directory path throws "EISDIR: illegal operation" error

Open Luiz-N opened this issue 8 years ago • 1 comments

remoteOrigin.sync() works fine in a git repo but remoteOrigin.sync(process.cwd()) in the same repo throws the following error:

Error: EISDIR: illegal operation on a directory, read
    at Error (native)
    at Object.fs.readSync (fs.js:732:19)
    at tryReadSync (fs.js:487:20)
    at Object.fs.readFileSync (fs.js:535:19)
    at Function.parseSync [as sync]

This does work however:

remoteOrigin.sync(`${process.cwd()}/.git/config`)

Luiz-N avatar Oct 09 '17 05:10 Luiz-N

Thanks, want to do a pr?

jonschlinkert avatar Oct 09 '17 13:10 jonschlinkert