Mon, 21 Feb 2022 21:00:21 -0600
Fix terminal breakage with lsp
946
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
1 | #!/usr/bin/env ruby |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
2 | # frozen_string_literal: true |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
3 | |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
4 | require 'bundler/inline' |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
6 | gemfile do |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | source 'https://rubygems.org' |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
8 | gem 'debug', '>= 1.0.0' |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | end |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
11 | def run |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
12 | if File.exist?(Bundler.unbundled_env.fetch('BUNDLE_GEMFILE', 'Gemfile')) |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
13 | Bundler.with_unbundled_env do |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
14 | Bundler.reset! |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
15 | yield |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
16 | exit |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
17 | end |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
18 | end |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
19 | yield |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
20 | end |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
21 | |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
22 | run do |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
23 | load Gem.bin_path('debug', 'rdbg') |
20c0492da189
Add sick "run anywhere ignoring bundler" hacks
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
24 | end |