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

Commit 9cb4124

Browse files
committed
DEV: Allow for env for users with symlinks
1 parent b1f27f7 commit 9cb4124

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 File.expand_path("../../../../discourse/config/environment", __dir__)
32+
require "#{discourse_path}/config/environment"
3333

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

0 commit comments

Comments
 (0)