coverallsapp / orb

Coveralls CircleCI Orb
https://circleci.com/orbs/registry/orb/coveralls/coveralls
MIT License
2 stars 16 forks source link

Add option not to rely on sudo if $EUID is not 0 #10

Closed blacelle closed 1 year ago

blacelle commented 4 years ago

Hello,

I progress with coveralls integration. I encounter an issue as, to install npm, I rely on :

https://circleci.com/developer/orbs/orb/circleci/node#usage-install_nodejs

However, I then get:

sudo: npm: command not found

Given

https://stackoverflow.com/questions/31472755/sudo-npm-command-not-found

I understand npm should have been installed in a place available to sudo, but this node/npm does not do it this way.

However, Coveralls orb prefer prefixing npm with sudo when not executed as root, which seem to be the cause of my issue.

Is it possible to add an option not to rely on sudo even if $EUID is not 0?

shailesh-kanzariya commented 3 years ago

I am also facing same issue. Circle CI gives an error:

Screenshot 2020-12-07 at 11 22 47 PM

Please fix it.

blacelle commented 3 years ago

@shailesh-kanzariya I ended crafting my orb, replicating this one:

https://github.com/solven-eu/circleci-orb-coveralls

orbs:
  # coveralls: coveralls/coveralls@1.0.6
  coveralls: solven/coveralls@0.0.1
shailesh-kanzariya commented 3 years ago

@blacelle Thanks for sharing your orb. if you submit PR here fixing this issue would be more helpful.

arihirsch commented 2 years ago

@blacelle thank you so much for your contribution, saved me a whole lot of trouble

mrexox commented 1 year ago

Hey everyone! New orb v2.0.0 doesn't require sudo and supports more coverage formats. Please, try it out!