mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(dx): have electron-rebuild read from path on NixOS too
This commit is contained in:
parent
88aa76bcab
commit
62a0a44049
@ -23,6 +23,15 @@ function resetPath() {
|
|||||||
export function getElectronPath() {
|
export function getElectronPath() {
|
||||||
if (isNixOS()) {
|
if (isNixOS()) {
|
||||||
resetPath();
|
resetPath();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const path = execSync("which electron").toString("utf-8").trimEnd();
|
||||||
|
return path;
|
||||||
|
} catch (e) {
|
||||||
|
// Nothing to do, since we have a fallback below.
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Using default since no Electron is available in path.");
|
||||||
return execSync("nix eval --raw nixpkgs#electron_37").toString("utf-8") + "/bin/electron";
|
return execSync("nix eval --raw nixpkgs#electron_37").toString("utf-8") + "/bin/electron";
|
||||||
} else {
|
} else {
|
||||||
return "electron";
|
return "electron";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user