fix: rework logic for finding obsidian
Some checks failed
Playwright Tests / test (push) Failing after 2m0s
Some checks failed
Playwright Tests / test (push) Failing after 2m0s
This commit is contained in:
parent
a2bf146f99
commit
ee6ee57d12
@ -13,6 +13,9 @@ export interface ObsidianTestingConfig {
|
||||
|
||||
export function getExe(obsidianPath?: string): string {
|
||||
checkToy();
|
||||
if (obsidianPath) {
|
||||
return path.join(obsidianPath, "Resources", "app.asar");
|
||||
}
|
||||
if (process.platform == "win32") {
|
||||
const p = path.join(
|
||||
process.env.LOCALAPPDATA!,
|
||||
@ -22,13 +25,7 @@ export function getExe(obsidianPath?: string): string {
|
||||
);
|
||||
if (existsSync(p)) {
|
||||
return p;
|
||||
}
|
||||
if (obsidianPath) {
|
||||
const p = path.join(obsidianPath, "Resources", "app.asar");
|
||||
if (existsSync(p)) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const possibleDirs = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user