mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
attempt fixing github test
This commit is contained in:
parent
83ecc2bca1
commit
965dd5e29d
2 changed files with 13 additions and 1 deletions
|
@ -105,6 +105,12 @@ export function getAppDataPath() {
|
||||||
const platform = os.platform();
|
const platform = os.platform();
|
||||||
let appDataPath;
|
let appDataPath;
|
||||||
|
|
||||||
|
// Check if running in GitHub Actions
|
||||||
|
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true';
|
||||||
|
if (isGitHubActions) {
|
||||||
|
return "/home/runner/work/FreeDATA/FreeDATA/gui/config";
|
||||||
|
}
|
||||||
|
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case "darwin": // macOS
|
case "darwin": // macOS
|
||||||
appDataPath = path.join(os.homedir(), "Library", "Application Support");
|
appDataPath = path.join(os.homedir(), "Library", "Application Support");
|
||||||
|
|
|
@ -7,7 +7,13 @@ const nconf = require("nconf");
|
||||||
|
|
||||||
var appDataPath = getAppDataPath();
|
var appDataPath = getAppDataPath();
|
||||||
var configFolder = path.join(appDataPath, "FreeDATA");
|
var configFolder = path.join(appDataPath, "FreeDATA");
|
||||||
var configPath = path.join(configFolder, "config.json");
|
|
||||||
|
let configFile = "config.json"
|
||||||
|
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true';
|
||||||
|
if (isGitHubActions) {
|
||||||
|
configFile = "example.json";
|
||||||
|
}
|
||||||
|
var configPath = path.join(configFolder, configFile);
|
||||||
|
|
||||||
console.log("AppData Path:", appDataPath);
|
console.log("AppData Path:", appDataPath);
|
||||||
console.log(configFolder);
|
console.log(configFolder);
|
||||||
|
|
Loading…
Reference in a new issue