Download apps/server/dist/lib/exec-utils.js from Leon4gr45/automaker: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/Leon4gr45/automaker/resolve/main/apps/server/dist/lib/exec-utils.js
- Command line
-
hf download hf://spaces/Leon4gr45/automaker/apps/server/dist/lib/exec-utils.js
-
curl -L -o exec-utils.js https://huggingface.co/spaces/Leon4gr45/automaker/resolve/main/apps/server/dist/lib/exec-utils.js
871 Bytes
| /** | |
| * Shared execution utilities | |
| * | |
| * Common helpers for spawning child processes with the correct environment. | |
| * Used by both route handlers and service layers. | |
| */ | |
| import { createLogger } from '@automaker/utils'; | |
| const logger = createLogger('ExecUtils'); | |
| // Extended PATH to include common tool installation locations | |
| export const extendedPath = [ | |
| process.env.PATH, | |
| '/opt/homebrew/bin', | |
| '/usr/local/bin', | |
| '/home/linuxbrew/.linuxbrew/bin', | |
| `${process.env.HOME}/.local/bin`, | |
| ] | |
| .filter(Boolean) | |
| .join(':'); | |
| export const execEnv = { | |
| ...process.env, | |
| PATH: extendedPath, | |
| }; | |
| export function getErrorMessage(error) { | |
| if (error instanceof Error) { | |
| return error.message; | |
| } | |
| return String(error); | |
| } | |
| export function logError(error, context) { | |
| logger.error(`${context}:`, error); | |
| } | |
| //# sourceMappingURL=exec-utils.js.map |