Closed konklone closed 10 years ago
Yeah. That error means it wasn’t able to open your web browser using the open
command. For example, on Mac OS X, you can say:
open 'http://example.com'
And it will open that URL in your web browser of choice. What’s the equivalent in Ubuntu?
A simple workaround is to create your ~/.gistup.json file manually. It should look like this:
{
"token": "XXXXXXXXXXXXXXXXXXXXXX"
}
Where XXXXXXXXXXXXXXXXXXXXXX is your access token.
Added a simple fallback in 0.0.4. Thanks for the report!
Oh, nice!
Also, I poked around, looks like on Ubuntu it's xdg-open
. Annoyingly though, open
is available at /bin/open
but it doesn't work. open
will return a non-0 response code though, so you could do:
open [url] || xdg-open [url]
And that should execute xdg-open
only if open
fails. It will still print out the "Couldn't get a file descriptor referring to the console" error, though.
I get this on OSX 10.9:
Press any key to open GitHub…
/usr/local/lib/node_modules/gistup/lib/gistup/get-settings.js:38
child.exec(open + " 'https://github.com/settings/tokens/new'", functio
^
ReferenceError: open is not defined
at ReadStream.<anonymous> (/usr/local/lib/node_modules/gistup/lib/gistup/get-settings.js:38:20)
at ReadStream.g (events.js:180:16)
at ReadStream.EventEmitter.emit (events.js:95:17)
at ReadStream.<anonymous> (_stream_readable.js:746:14)
at ReadStream.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at ReadStream.Readable.push (_stream_readable.js:127:10)
at TTY.onread (net.js:528:21)
Odd, as open
works fine from command line.
$ which open
/usr/bin/open
Sorry, I must have just broken this. Looking.
Fixed in 0.1.1.
Thanks!
Once I had ~/.gistup.json
and my SSH keys generated, gistup opened the browser with no problems.
Yep the bug was only on initialization.
Maybe it's cause I'm on Ubuntu, not sure how this stuff operates on OS X:
One workaround would be to allow an auth token to be given over the command line, as an option.