mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 00:47:38 -06:00
Chore: Fix running frontend unit tests in JetBrains (#93441)
read the files with their absolute paths
This commit is contained in:
parent
6a3dbe7d41
commit
37e4353a18
@ -1,13 +1,15 @@
|
||||
const { parse } = require('ini');
|
||||
const { readFileSync, existsSync } = require('node:fs');
|
||||
const path = require('path');
|
||||
|
||||
const getEnvConfig = () => {
|
||||
const defaultSettings = readFileSync(`./conf/defaults.ini`, {
|
||||
const grafanaRoot = path.join(__dirname, '../..');
|
||||
const defaultSettings = readFileSync(`${grafanaRoot}/conf/defaults.ini`, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
|
||||
const customSettings = existsSync(`./conf/custom.ini`)
|
||||
? readFileSync(`./conf/custom.ini`, {
|
||||
const customSettings = existsSync(`${grafanaRoot}/conf/custom.ini`)
|
||||
? readFileSync(`${grafanaRoot}/conf/custom.ini`, {
|
||||
encoding: 'utf-8',
|
||||
})
|
||||
: '';
|
||||
|
Loading…
Reference in New Issue
Block a user