erplibre/script
Mathieu Benoit b9c9ed8241 [FIX] install: propager l'échec au code de sortie (faux ✅ du suivi corrigé)
update_env_version.py (cible « make install_odoo_XX ») calculait un statut
mais ne faisait JAMAIS sys.exit() et IGNORAIT le retour de
update_environment() (l'install réelle : venv/poetry). Résultat : même
quand install_locally.sh échouait (ex. poetry status 127), le script
sortait 0 -> make 0 -> remote « && » continuait (service créé) ->
__ERPLIBRE_EXIT__ 0 -> le suivi d'installation affichait ✅ à tort.

- main() suit un exit_code : install_system() ou update_environment()
  renvoyant une valeur non nulle (os.system : 0 = succès) -> exit_code=1.
- sys.exit(main() or 0) propage réellement l'échec.
- Étapes post-install (pycharm, git_repo_update, generate_config) exécutées
  seulement si l'install a réussi (sinon .venv.erplibre absent -> cascade
  d'erreurs).

Chaîne désormais complète : install_locally.sh exit 1 -> install_locally_
dev.sh exit 1 -> os.system != 0 -> install_erplibre != 0 ->
update_environment != 0 -> main exit_code=1 -> sys.exit(1) -> make échoue
-> remote && stoppe -> __ERPLIBRE_EXIT__ != 0 -> dashboard ❌.

--- EN ---

update_env_version.py, the « make install_odoo_XX » target, computed a status
but NEVER called sys.exit() and IGNORED the return of update_environment(),
the real install with its venv and poetry. As a result, even when
install_locally.sh failed — poetry status 127, say — the script exited 0 ->
make exited 0 -> the remote « && » carried on and created the service ->
__ERPLIBRE_EXIT__ was 0 -> and the install monitor wrongly showed ✅.

- main() tracks an exit_code: install_system() or update_environment()
  returning non-zero — with os.system, 0 means success — sets exit_code=1.
- sys.exit(main() or 0) actually propagates the failure.
- The post-install steps (pycharm, git_repo_update, generate_config) only run
  when the install succeeded; otherwise .venv.erplibre is missing and errors
  cascade.

The chain is now complete: install_locally.sh exit 1 ->
install_locally_dev.sh exit 1 -> os.system != 0 -> install_erplibre != 0 ->
update_environment != 0 -> main exit_code=1 -> sys.exit(1) -> make fails ->
the remote && stops -> __ERPLIBRE_EXIT__ != 0 -> dashboard ❌.

Assisted-by: Claude Opus 4.8
2026-08-07 02:49:49 -04:00
..
addons [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
apache [ADD] apache configuration template 2025-10-31 01:31:21 -04:00
code [UPD] script Format 2026-03-14 23:26:31 -04:00
code_generator [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
config [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
database [UPD] script Format 2026-03-14 23:26:31 -04:00
deployment [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
docker [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
execute [UPD] script execute with more space for command display 2026-03-14 23:26:31 -04:00
fork_github_repo [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
git [ADD] installation: add optional extra modules (CybroOdoo) 2026-08-07 02:09:24 -04:00
ide [UPD] script Format 2026-03-14 23:26:31 -04:00
install [IMP] script install: quiet poetry/repo by default, EL_VERBOSE to opt in 2026-08-07 02:49:14 -04:00
maintenance [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
manifest [IMP] script install: quiet poetry/repo by default, EL_VERBOSE to opt in 2026-08-07 02:49:14 -04:00
nginx [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
odoo [UPD] script Format 2026-03-14 23:26:31 -04:00
performance [ADD] script performance: use tool to test request per second on website 2025-11-01 01:09:32 -04:00
poetry [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
postgresql/migration [UPD] script Format 2026-03-14 23:26:31 -04:00
process [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
restful [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
selenium [FIX] selenium: importer Optional (NameError sur l'annotation de type) 2026-08-07 02:49:42 -04:00
statistic [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
system [ADD] script system: search_docker_compose_erplibre.sh 2024-05-03 23:13:59 -04:00
systemd [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
terminal [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00
test [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
todo [FIX] script todo upgrade: don't create branch if already exist 2026-08-07 02:11:11 -04:00
version [FIX] install: propager l'échec au code de sortie (faux ✅ du suivi corrigé) 2026-08-07 02:49:49 -04:00
__init__.py [IMP] Copy ERPLibre from https://github.com/mathbentech/InstallScript 2020-04-20 03:56:45 -04:00
generate_config.sh [FIX] generate_config: drop odoo_design-themes from the addons path 2026-08-07 02:09:40 -04:00
lib_asyncio.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
make.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
open_terminal_code_generator.sh [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00