This repository was archived by the owner on Feb 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
This repository was archived by the owner on Feb 9, 2021. It is now read-only.
UnhandledPromiseRejectionWarning on macOS #18
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
https://github.com/ruby/spec/pull/683/checks?check_run_id=202172164
Run actions/setup-ruby@v1
with:
ruby-version: 2.5.x
do ln -sf /Users/runner/hostedtoolcache/Ruby/2.5.5/x64/bin/ruby /usr/bin/ruby
##[add-path]/Users/runner/hostedtoolcache/Ruby/2.5.5/x64/bin
ln: /usr/bin/ruby: Operation not permitted
(node:825) UnhandledPromiseRejectionWarning: Error: The process 'sudo' failed with exit code 1
at ExecState._setResult (/Users/runner/runners/2.157.0/work/_actions/actions/setup-ruby/v1/node_modules/@actions/exec/lib/toolrunner.js:547:25)
at ExecState.CheckComplete (/Users/runner/runners/2.157.0/work/_actions/actions/setup-ruby/v1/node_modules/@actions/exec/lib/toolrunner.js:530:18)
at ChildProcess.<anonymous> (/Users/runner/runners/2.157.0/work/_actions/actions/setup-ruby/v1/node_modules/@actions/exec/lib/toolrunner.js:430:27)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:430:11)
at Socket.emit (events.js:200:13)
at Pipe.<anonymous> (net.js:586:12)
(node:825) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:825) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It seems the ln -sf fails on macOS. The build still works nevertheless.
Actually, what tool requires /usr/bin/ruby to be the same as ruby in PATH?
AFAIK other CIs and all 3 major Ruby managers do not touch /usr/bin/ruby.
I saw
Lines 18 to 20 in 623660d
| // Ruby / Gem heavily use the '#!/usr/bin/ruby' to find ruby, so this task needs to | |
| // replace that version of ruby so all the correct version of ruby gets selected | |
| // replace the default |
but in my experience there is no such problem with RubyGems (as long as
gem is on PATH too alongside ruby, but that should always be the case).
I think if such a workaround is needed, it should be done only in those needed cases, not by setup-ruby, what do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working