config: move setHome to top

This commit is contained in:
Fabricio Silva 2024-04-09 14:47:35 +01:00
parent 549c445853
commit 436ee084e3
No known key found for this signature in database
GPG key ID: 3B87DB678484A9B0

View file

@ -8,6 +8,8 @@ import Helper from "../helper";
import Config from "../config";
import Utils from "./utils";
Config.setHome(process.env.THELOUNGE_HOME || Utils.defaultHome());
const program = new Command("thelounge");
program
.version(Helper.getVersion(), "-v, --version")
@ -21,8 +23,6 @@ program
// Parse options from `argv` returning `argv` void of these options.
const argvWithoutOptions = program.parseOptions(process.argv);
Config.setHome(process.env.THELOUNGE_HOME || Utils.defaultHome());
// Check config file owner and warn if we're running under a different user
try {
verifyFileOwner();