containerized icon indicating copy to clipboard operation
containerized copied to clipboard

Outputs stderr into console

Open scholtzm opened this issue 9 years ago • 7 comments
trafficstars

If running outside a container, this module (the command ran through spawnSync) will print a message into stderr on OSX:

cat: /proc/self/cgroup: No such file or directory

This is the same as running the command directly in Terminal:

$ cat /proc/self/cgroup
cat: /proc/self/cgroup: No such file or directory

Is this behavior expected?

scholtzm avatar Sep 06 '16 13:09 scholtzm

Having this issue too. It shouldn't do this.

vjpr avatar Oct 04 '16 08:10 vjpr

@scholtzm @vjpr Understand the problem, have you found ways to overcome this already by now, or what do you prefer would be a better solution? Emit an error event that one could listen to from their code above (and then decide to just ignore it if that is needed, for example)?

martintajur avatar Nov 01 '16 12:11 martintajur

It's not really causing us any issues so it doesn't really bother me that much. 😄

I'm thinking the API of this package would get a lot more complicated (from a single boolean function to event emitting object), so I'm not sure if I would personally go that way. 🤔

scholtzm avatar Nov 07 '16 13:11 scholtzm

@martintajur That's a good point, someone might want to run node app just inside the container, event emitting might be a good way to ensure that.

anujkumar-df avatar Jan 09 '17 18:01 anujkumar-df

Can you not just pass in stdio: 'ignore' as an option to child_process?

cgroups = child_process.execSync(cmd(), {
    stdio: 'ignore'
});

OmgImAlexis avatar Apr 06 '17 04:04 OmgImAlexis

This is happening also on Windows: 'cat' is not recognized as an internal or external command, operable program or batch file.

ZaDarkSide avatar Jun 04 '17 03:06 ZaDarkSide

Does the same thing on MacOS.

cat: /proc/self/cgroup: No such file or directory

Stops nodemon from running.

crung avatar Aug 15 '18 09:08 crung

DEPRECATED (You can use following package instead: https://github.com/sindresorhus/is-docker)

nikolajevp avatar Dec 02 '22 11:12 nikolajevp