This commit is contained in:
parent
ae0500e01e
commit
21b2584ef0
@ -55,10 +55,13 @@ function generateVaultConfig(vault: string) {
|
||||
} else {
|
||||
configLocation = path.join(`${process.env.XDG_CONFIG_HOME}`, "obsidian");
|
||||
try {
|
||||
mkdirSync(configLocation, {recursive: true})
|
||||
mkdirSync(configLocation, { recursive: true });
|
||||
} catch (e) {}
|
||||
}
|
||||
const obsidianConfigFile = path.join(configLocation, "obsidian.json");
|
||||
if (!existsSync(obsidianConfigFile)) {
|
||||
writeFileSync(obsidianConfigFile, JSON.stringify({ vaults: {} }));
|
||||
}
|
||||
const json: {
|
||||
vaults: {
|
||||
[key: string]: {
|
||||
@ -91,11 +94,10 @@ const obsidianTestFixtures: Fixtures<ObsidianTestFixtures> = {
|
||||
if (vault) {
|
||||
let id = generateVaultConfig(vault);
|
||||
if (!!id) {
|
||||
uriArg = `obsidian://open?vault=${encodeURIComponent(id)}`
|
||||
uriArg = `obsidian://open?vault=${encodeURIComponent(id)}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const electronApp = await electron.launch({
|
||||
timeout: 60000,
|
||||
args: [getExe(), uriArg].filter((a) => !!a) as string[],
|
||||
|
Loading…
Reference in New Issue
Block a user