question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make it return something in Docker

See original GitHub issue

https://github.com/sindresorhus/username/blob/master/index.js#L29

Above userInfo() call should be wrapped in try catch block.

This causes crash when running for example in docker container like:

docker run --user $(id -u): $(id -g) ...

Because user in docker then will be without $HOME and username both.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sindresorhuscommented, Jan 26, 2019

Thanks for opening the issue on Node.js. I have worked around the issue on my end now.

0reactions
raidocommented, Jan 26, 2019

I opened a PR as possible solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker run - Docker Documentation
This will create a container and print test to the console. The cidfile flag makes Docker attempt to create a new file and...
Read more >
Docker: set a return value as an environment variable
One is to do all of the work you need inside a single RUN step that runs multiple commands. The environment variable won't...
Read more >
(How to) Run GATK in a Docker container
The hitch is that you can't do this after you started running the container, so you'll have to shut it down and run...
Read more >
Understanding and Building Docker Images - JFrog
So, we'll briefly cover how to create Docker images for deploying your code ... But you can also identify your container with something...
Read more >
FastAPI in Containers - Docker
And there are many other images for different things like databases, for example for: PostgreSQL · MySQL · MongoDB · Redis, etc. By...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found