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

feat: support container detection

Open zAlweNy26 opened this issue 1 year ago • 4 comments

Resolves #140

@pi0 is it okay? I also added the wsl and other containers' checks to cover eventually future requests.

zAlweNy26 avatar Oct 03 '24 17:10 zAlweNy26

Codecov Report

Attention: Patch coverage is 0% with 76 lines in your changes missing coverage. Please review.

Project coverage is 52.63%. Comparing base (5558f03) to head (a1ff14b). Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/containers/wsl.ts 0.00% 30 Missing and 1 partial :warning:
src/containers/docker.ts 0.00% 23 Missing and 1 partial :warning:
src/containers/container.ts 0.00% 17 Missing and 1 partial :warning:
src/containers/index.ts 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #141       +/-   ##
===========================================
- Coverage   82.08%   52.63%   -29.46%     
===========================================
  Files          10       14        +4     
  Lines         374      285       -89     
  Branches       33       35        +2     
===========================================
- Hits          307      150      -157     
- Misses         61      125       +64     
- Partials        6       10        +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 03 '24 17:10 codecov[bot]

Thanks. Since wsl is not exactly a container (it is VM with dedicated kernel), i would suggest to use /ws and /docker subpaths.

I would love to explore idea of detecting other container runtimes (from cgroups perhaps?) we can iterate later.

pi0 avatar Oct 03 '24 17:10 pi0

You're right, I just didn't want to make another folder just for that ahah Anyway okay I'll separate them, should I remove the other container runtimes' checks? I'll try to add tests for these new flags, hoping not to mess it up ahah

zAlweNy26 avatar Oct 03 '24 17:10 zAlweNy26

(sorry for late review on this -- it is definitely under my radar)

pi0 avatar Nov 08 '24 18:11 pi0