mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-06 22:37:16 +02:00
Be data_dir under the tmp/ on test environment
This commit is contained in:
parent
d3ec0b3184
commit
682d6dfa3c
@ -21,7 +21,11 @@ module FluentdUI
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.data_dir
|
def self.data_dir
|
||||||
|
if Rails.env.test?
|
||||||
|
dir = Rails.root.join("tmp", "core_data").to_s
|
||||||
|
else
|
||||||
dir = ENV["FLUENTD_UI_DATA_DIR"].presence || ENV["HOME"] + "/.fluentd-ui/core_data"
|
dir = ENV["FLUENTD_UI_DATA_DIR"].presence || ENV["HOME"] + "/.fluentd-ui/core_data"
|
||||||
|
end
|
||||||
FileUtils.mkdir_p(dir) # ensure directory exists
|
FileUtils.mkdir_p(dir) # ensure directory exists
|
||||||
dir
|
dir
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user