Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #748 from Shopify/work_around_rvm_fd_9_issue
Browse files Browse the repository at this point in the history
Gracefully ignore ArgumentError in the shim check
  • Loading branch information
paulomarg authored Jul 15, 2020
2 parents dfad776 + d17707b commit 556c57a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/shopify-cli/core/entry_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ def call(args, ctx = Context.new)
IO.open(9) { is_shell_shim = true }
rescue Errno::EBADF
# This is expected if the descriptor doesn't exist
rescue ArgumentError => e
# This can happen on RVM, because it can use fd 9 itself and block access to it. That only happens if the fd
# did not exist beforehand, so that means there was no fd 9 before Ruby started.
unless e.message == 'The given fd is not accessible because RubyVM reserves it'
raise e
end
end

if !ctx.testing? && is_shell_shim
Expand Down

0 comments on commit 556c57a

Please sign in to comment.