orchestrator: switch wrapper interface from CLI args to env vars to avoid archinstall argparse collision
This commit is contained in:
3 files changed
+39
-34
No files matched your search
@@ -6,10 +6,24 @@
|
||||
|
||||
set -eEo pipefail
|
||||
|
||||
# Patch archinstall BEFORE Python loads it. orchestrator/main.py top-level
|
||||
# imports archinstall_adapter, which top-level imports archinstall.*; patching
|
||||
# inside a phase would be too late (bytecode already loaded).
|
||||
# Patch archinstall BEFORE Python loads it. phases_impl.py imports
|
||||
# archinstall_adapter, which imports archinstall.*; patching inside a phase
|
||||
# would be too late (bytecode already loaded).
|
||||
omarchy-iso-patch-archinstall
|
||||
|
||||
# Parse our args; convert to env vars before exec'ing Python so archinstall's
|
||||
# own argparse (which runs at module import time inside the orchestrator)
|
||||
# doesn't choke on flags it doesn't recognize.
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--config) export OMARCHY_INSTALL_CONFIG="$2"; shift 2 ;;
|
||||
--creds) export OMARCHY_INSTALL_CREDS="$2"; shift 2 ;;
|
||||
--full-name-file) export OMARCHY_INSTALL_FULL_NAME_FILE="$2"; shift 2 ;;
|
||||
--email-file) export OMARCHY_INSTALL_EMAIL_FILE="$2"; shift 2 ;;
|
||||
--encrypt-file) export OMARCHY_INSTALL_ENCRYPT_FILE="$2"; shift 2 ;;
|
||||
*) echo "omarchy-iso-install: unknown arg $1" >&2; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd /usr/share/omarchy-iso
|
||||
exec python -m orchestrator.main "$@"
|
||||
exec python -m orchestrator.main
|
||||
Reference in new issue
Block a user