This commit is contained in:
parent
f2864db6f1
commit
75b5ca8b4e
@ -5,6 +5,7 @@ import path from "path";
|
||||
import { ObsidianTestFixtures } from "./fixtures.js";
|
||||
import { existsSync } from "fs";
|
||||
import { getApp, waitForIndexingComplete } from "./util.js";
|
||||
import {execSync} from "child_process";
|
||||
|
||||
export interface ObsidianTestingConfig {
|
||||
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"];
|
||||
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]}`).toString());
|
||||
return path.join(possibleDirs[i], "resources", "app.asar");
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user