[CodeFactor] Apply fixes

This commit is contained in:
codefactor-io 2024-01-23 10:44:34 +00:00
parent 9d2332477f
commit 53a34eaaa2
No known key found for this signature in database
GPG key ID: B66B2D63282C190F
2 changed files with 6 additions and 6 deletions

View file

@ -105,8 +105,8 @@ export function getAppDataPath() {
const platform = os.platform(); const platform = os.platform();
let appDataPath; let appDataPath;
// Check if running in GitHub Actions // Check if running in GitHub Actions
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true'; const isGitHubActions = process.env.GITHUB_ACTIONS === "true";
if (isGitHubActions) { if (isGitHubActions) {
return "/home/runner/work/FreeDATA/FreeDATA/gui/config"; return "/home/runner/work/FreeDATA/FreeDATA/gui/config";
} }

View file

@ -7,12 +7,12 @@ const nconf = require("nconf");
var appDataPath = getAppDataPath(); var appDataPath = getAppDataPath();
var configFolder = path.join(appDataPath, "FreeDATA"); var configFolder = path.join(appDataPath, "FreeDATA");
let configFile = "config.json" let configFile = "config.json";
const isGitHubActions = process.env.GITHUB_ACTIONS === 'true'; const isGitHubActions = process.env.GITHUB_ACTIONS === "true";
if (isGitHubActions) { if (isGitHubActions) {
configFile = "example.json"; configFile = "example.json";
configFolder = appDataPath; configFolder = appDataPath;
} }
var configPath = path.join(configFolder, configFile); var configPath = path.join(configFolder, configFile);