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

Commit 556c57a

Browse files
authored
Merge pull request #748 from Shopify/work_around_rvm_fd_9_issue
Gracefully ignore ArgumentError in the shim check
2 parents dfad776 + d17707b commit 556c57a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/shopify-cli/core/entry_point.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ def call(args, ctx = Context.new)
1111
IO.open(9) { is_shell_shim = true }
1212
rescue Errno::EBADF
1313
# This is expected if the descriptor doesn't exist
14+
rescue ArgumentError => e
15+
# This can happen on RVM, because it can use fd 9 itself and block access to it. That only happens if the fd
16+
# did not exist beforehand, so that means there was no fd 9 before Ruby started.
17+
unless e.message == 'The given fd is not accessible because RubyVM reserves it'
18+
raise e
19+
end
1420
end
1521

1622
if !ctx.testing? && is_shell_shim

0 commit comments

Comments
 (0)