Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit af47873

Browse files
authored
FIX: hardcoded require for evals (#1137)
The require for `discourse/config/environment` should point to the local user's core Discourse environment instead of the hardcoded path for Sam's env.
1 parent 37bf160 commit af47873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

evals/lib/boot.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
end
2525
end
2626

27-
discourse_path = File.expand_path(File.join(__dir__, "../../../.."))
27+
discourse_path = ENV["DISCOURSE_PATH"] || File.expand_path(File.join(__dir__, "../../../.."))
2828
# rubocop:disable Discourse/NoChdir
2929
Dir.chdir(discourse_path)
3030
# rubocop:enable Discourse/NoChdir
3131

32-
require "/home/sam/Source/discourse/config/environment"
32+
require "#{discourse_path}/config/environment"
3333

3434
ENV["DISCOURSE_AI_NO_DEBUG"] = "1"
3535
module DiscourseAi::Evals

0 commit comments

Comments
 (0)