summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-01 20:18:40 +0200
committerPaul Buetow <paul@buetow.org>2026-03-01 20:18:40 +0200
commit990c817571844462906b4ac7a58e64640be660e2 (patch)
tree9ae17e7f5d793983f041071aec41fd02393a9af7 /bin
parent7a627917fa6211ccb8b515d6669f2b10cfea5f6c (diff)
fix bin/rcm to fall back to lib/dsl when gem is not installed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rcm9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/rcm b/bin/rcm
index 2a7b6cd..240e217 100755
--- a/bin/rcm
+++ b/bin/rcm
@@ -14,5 +14,12 @@ unless File.exist?(config_file)
exit 1
end
-require 'rcm'
+# Try the installed gem first; fall back to the lib/ directory relative to
+# this script so the CLI works directly from a repository checkout.
+begin
+ require 'rcm'
+rescue LoadError
+ require_relative '../lib/dsl'
+end
+
load config_file