@coworker-jp/aidr 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.mjs +1 -1
- package/src/scheduled.mjs +8 -1
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
package/src/scheduled.mjs
CHANGED
|
@@ -304,7 +304,7 @@ WantedBy=timers.target
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 }) {
|
|
307
|
+
export async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 }) {
|
|
308
308
|
// launchd does not support EnvironmentFile, so we use a tiny wrapper that
|
|
309
309
|
// sources /etc/aidr/aidr.env and execs the binary. Plist itself stays 0644
|
|
310
310
|
// (launchctl bootstrap requires it readable); the secret lives in the env
|
|
@@ -315,6 +315,13 @@ async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 })
|
|
|
315
315
|
set -a
|
|
316
316
|
. ${SYSTEM_ENV_FILE}
|
|
317
317
|
set +a
|
|
318
|
+
# launchd starts daemons with a narrow default PATH (/usr/bin:/bin:/usr/sbin:/sbin)
|
|
319
|
+
# that omits Homebrew. Without this, scan endpoint-info silently misses brew
|
|
320
|
+
# packages because Command::new("brew") spawn fails — gem still works because
|
|
321
|
+
# /usr/bin/gem is on the default PATH. Both Apple Silicon (/opt/homebrew/bin)
|
|
322
|
+
# and Intel (/usr/local/bin) prefixes are safe to prepend on either arch since
|
|
323
|
+
# missing dirs in PATH are simply ignored at lookup time.
|
|
324
|
+
export PATH="/opt/homebrew/bin:/usr/local/bin:/opt/homebrew/sbin:/usr/local/sbin:\${PATH:-/usr/bin:/bin:/usr/sbin:/sbin}"
|
|
318
325
|
exec ${binaryPath} scan endpoint-info
|
|
319
326
|
`;
|
|
320
327
|
|