remote-origin-url
remote-origin-url copied to clipboard
Passing in directory path throws "EISDIR: illegal operation" error
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`)
Thanks, want to do a pr?