Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented May 10, 2018

Problem

in some environments, e.g., docker, the bin necessary to open a URL in the browser is not present:

npm ERR! path xdg-open
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn xdg-open
npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-05-10T22_34_37_812Z-debug.log

Solution

catch the error and output the URL that should be opened to the terminal:

to complete your login please visit:

https://www.blerg.blerg.io

@bcoe bcoe requested a review from a team as a code owner May 10, 2018 22:35
@zkat zkat force-pushed the handle-missing-open branch from 6ae4e98 to 5e8eae2 Compare May 11, 2018 21:47
Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐑 🚀 💥 🎉

@zkat zkat changed the base branch from latest to release-next May 11, 2018 21:47
@zkat zkat merged commit eb75220 into release-next May 11, 2018
@zkat zkat deleted the handle-missing-open branch May 11, 2018 21:48
@zkat
Copy link
Contributor

zkat commented May 11, 2018

note that the CI errors were just the Object.entries thing from 6.0.0 on node@6

@sindresorhus
Copy link

By the way, opn bundles xdg-open in the package, so it would work on Docker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants