fix: refactor: lib/env.sh — split into a defined-surface shared lib; entrypoints own context-specific paths (#674)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3d7c27f6c6
commit
6589c761ba
6 changed files with 86 additions and 25 deletions
|
|
@ -24,6 +24,13 @@
|
|||
set -euo pipefail
|
||||
|
||||
FACTORY_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
# Ensure USER and HOME are set — preconditions for lib/env.sh (#674).
|
||||
# On the host these are normally provided by the shell; defensive defaults
|
||||
# handle edge cases (cron, minimal containers).
|
||||
export USER="${USER:-$(id -un)}"
|
||||
export HOME="${HOME:-$(eval echo "~${USER}")}"
|
||||
|
||||
source "${FACTORY_ROOT}/lib/env.sh"
|
||||
source "${FACTORY_ROOT}/lib/ops-setup.sh" # setup_ops_repo, migrate_ops_repo
|
||||
source "${FACTORY_ROOT}/lib/hire-agent.sh"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue