This commit is contained in:
parent
f2864db6f1
commit
6ed427afde
@ -5,6 +5,7 @@ import path from "path";
|
|||||||
import { ObsidianTestFixtures } from "./fixtures.js";
|
import { ObsidianTestFixtures } from "./fixtures.js";
|
||||||
import { existsSync } from "fs";
|
import { existsSync } from "fs";
|
||||||
import { getApp, waitForIndexingComplete } from "./util.js";
|
import { getApp, waitForIndexingComplete } from "./util.js";
|
||||||
|
import {execSync} from "child_process";
|
||||||
|
|
||||||
export interface ObsidianTestingConfig {
|
export interface ObsidianTestingConfig {
|
||||||
vault?: string;
|
vault?: string;
|
||||||
@ -24,7 +25,10 @@ export function getExe(): string {
|
|||||||
}
|
}
|
||||||
const possibleDirs = ["/opt/Obsidian", "/usr/lib/Obsidian", "/opt/obsidian", "/usr/lib/obsidian", "/var/lib/flatpak/app/md.obsidian.Obsidian/current/active/files", "/snap/obsidian/current"];
|
const possibleDirs = ["/opt/Obsidian", "/usr/lib/Obsidian", "/opt/obsidian", "/usr/lib/obsidian", "/var/lib/flatpak/app/md.obsidian.Obsidian/current/active/files", "/snap/obsidian/current"];
|
||||||
for(let i = 0; i < possibleDirs.length; i++) {
|
for(let i = 0; i < possibleDirs.length; i++) {
|
||||||
if(existsSync(possibleDirs[i])) return path.join(possibleDirs[i], "resources", "app.asar");
|
if(existsSync(possibleDirs[i])) {
|
||||||
|
console.log(execSync(`ls -l ${possibleDirs[i]}`));
|
||||||
|
return path.join(possibleDirs[i], "resources", "app.asar");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user