summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-18 18:43:03 +0200
committerPaul Buetow <paul@buetow.org>2026-03-18 18:43:03 +0200
commit3fe076087ea50ca56f211c4f4c00c8c08b0479da (patch)
tree4b15b62db4e4154b6e716a13704bd221cc31f664
parentbc7c64c601626e6a9fcd2c1e21a07a2e26e12e4d (diff)
fix: handle bundler self_manager.rb error with Errno::ENOENT
-rwxr-xr-xsnippets/hyperstack/hyperstack.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/snippets/hyperstack/hyperstack.rb b/snippets/hyperstack/hyperstack.rb
index d5b409b..dd83225 100755
--- a/snippets/hyperstack/hyperstack.rb
+++ b/snippets/hyperstack/hyperstack.rb
@@ -3,12 +3,8 @@
begin
require 'bundler/setup'
-rescue LoadError
+rescue LoadError, Gem::GemNotFoundException, Gem::LoadError, Errno::ENOENT
nil
-rescue Gem::Exception => e
- # Ruby can ship with a Bundler library version whose matching executable
- # is not installed locally. Fall back to direct gem loading in that case.
- raise unless e.is_a?(Gem::GemNotFoundException) || e.is_a?(Gem::LoadError)
end
require 'json'