Skip to content

fix(services): improve error message for missing locale on Linux#3071

Merged
tlgimenes merged 2 commits into
mainfrom
tlgimenes/test-decocms-ubuntu
Apr 8, 2026
Merged

fix(services): improve error message for missing locale on Linux#3071
tlgimenes merged 2 commits into
mainfrom
tlgimenes/test-decocms-ubuntu

Conversation

@tlgimenes
Copy link
Copy Markdown
Contributor

@tlgimenes tlgimenes commented Apr 8, 2026

What is this contribution about?

When running bunx decocms@latest on Linux systems without the en_US.UTF-8 locale (e.g. minimal Ubuntu, Alpine, slim Docker images), embedded-postgres fails with a cryptic error: "Postgres init script exited with code 1. Please check the logs." This adds a clear error message explaining the missing locale and how to fix it.

This is a known upstream issue in embedded-postgres, pending a proper fix.

How to Test

  1. Run a minimal Ubuntu 22.04 Docker container without en_US.UTF-8 locale
  2. Install Bun 1.3.11 and run bunx decocms@latest as a non-root user
  3. Observe the improved error message pointing to locale-gen en_US.UTF-8

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Clarifies embedded-postgres init failures on Linux systems by detecting a missing en_US.UTF-8 locale and showing a clear fix. Helps users on minimal distros and slim Docker images avoid the cryptic “init script exited with code 1” message.

  • Bug Fixes
    • Detects init errors containing “init script exited with code 1” or “invalid locale”.
    • Logs a concise message explaining the missing en_US.UTF-8 locale and how to install it on Linux systems: sudo apt-get install -y locales && sudo locale-gen en_US.UTF-8, then retry.
    • No behavior changes beyond improved logging.

Written for commit 266eac2. Summary will update on new commits.

When embedded-postgres fails to initialize on Linux systems without
en_US.UTF-8 locale, the error message is cryptic. Add a clear hint
pointing users to install the missing locale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

Release Options

Suggested: Patch (2.248.9) — based on fix: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.248.9-alpha.1
🎉 Patch 2.248.9
❤️ Minor 2.249.0
🚀 Major 3.0.0

Current version: 2.248.8

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tlgimenes tlgimenes merged commit 17732d8 into main Apr 8, 2026
15 checks passed
@tlgimenes tlgimenes deleted the tlgimenes/test-decocms-ubuntu branch April 8, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant