mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-27 00:17:29 +00:00
fix: stabilize launchd paths and appcast secret scan
This commit is contained in:
@@ -276,8 +276,8 @@ export async function uninstallLegacyLaunchAgents({
|
||||
return agents;
|
||||
}
|
||||
|
||||
const home = resolveHomeDir(env);
|
||||
const trashDir = path.join(home, ".Trash");
|
||||
const home = toPosixPath(resolveHomeDir(env));
|
||||
const trashDir = path.posix.join(home, ".Trash");
|
||||
try {
|
||||
await fs.mkdir(trashDir, { recursive: true });
|
||||
} catch {
|
||||
@@ -323,8 +323,8 @@ export async function uninstallLaunchAgent({
|
||||
return;
|
||||
}
|
||||
|
||||
const home = resolveHomeDir(env);
|
||||
const trashDir = path.join(home, ".Trash");
|
||||
const home = toPosixPath(resolveHomeDir(env));
|
||||
const trashDir = path.posix.join(home, ".Trash");
|
||||
const dest = path.join(trashDir, `${label}.plist`);
|
||||
try {
|
||||
await fs.mkdir(trashDir, { recursive: true });
|
||||
@@ -415,9 +415,10 @@ export async function installLaunchAgent({
|
||||
}
|
||||
|
||||
const plistPath = resolveLaunchAgentPlistPathForLabel(env, label);
|
||||
const home = resolveHomeDir(env);
|
||||
const home = toPosixPath(resolveHomeDir(env));
|
||||
const libraryDir = path.posix.join(home, "Library");
|
||||
await ensureSecureDirectory(home);
|
||||
await ensureSecureDirectory(path.join(home, "Library"));
|
||||
await ensureSecureDirectory(libraryDir);
|
||||
await ensureSecureDirectory(path.dirname(plistPath));
|
||||
|
||||
const serviceDescription = resolveGatewayServiceDescription({ env, environment, description });
|
||||
|
||||
Reference in New Issue
Block a user