std-env icon indicating copy to clipboard operation
std-env copied to clipboard

Support for containers (docker, etc...)?

Open zAlweNy26 opened this issue 1 year ago • 3 comments

Describe the feature

I think it would be nice to also add an isDocker and/or isContainer methods, so everything you need is in one module and you don't have to install the is-docker or is-inside-container packages separately :)

Additional information

  • [X] Would you be willing to help implement this feature?

zAlweNy26 avatar Oct 03 '24 15:10 zAlweNy26

For detecting docker from the main subpath, we need to use filesystem API which reduces platform agnostic nature of std-env.

We might port it as a subpath export though like { isDocker } from "std-env/docker") (https://github.com/unjs/listhen/blob/main/src/lib/docker.ts)

pi0 avatar Oct 03 '24 15:10 pi0

It seems a good way to me

zAlweNy26 avatar Oct 03 '24 15:10 zAlweNy26

PR welcome 👍🏼

pi0 avatar Oct 03 '24 16:10 pi0