• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jeeftor / audiobook-organizer / 20377228161 / 1
36%
master: 36%

Build:
DEFAULT BRANCH: master
Ran 19 Dec 2025 05:16PM UTC
Files 35
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Dec 2025 05:15PM UTC coverage: 35.353% (-0.01%) from 35.366%
20377228161.1

push

github

jeeftor
fix: environment variables now properly recognized (fixes #17)

Fixed issue where environment variables were not being recognized by
the application, both in binary and Docker container deployments.

Changes:
1. Updated PreRunE validation to check Viper values instead of flag changes
   - Previously checked cmd.Flags().Changed() which only detects CLI flags
   - Now checks viper.GetString() which includes env vars and config files

2. Moved custom env var loading to initConfig()
   - Ensures env vars are loaded after config file is read
   - Only sets env vars if not already set by config file or flags
   - Maintains proper precedence: flags > env vars > config file

3. Updated test-env-vars.sh to use .yaml extension for config files
   - Viper requires proper file extension for config file detection

Test Results:
✅ AO_ prefix environment variables recognized
✅ AUDIOBOOK_ORGANIZER_ prefix recognized
✅ AO_DIR alias recognized
✅ Config file loading works correctly
✅ All existing unit tests pass

This fix allows Docker users to set environment variables like:
  AO_INPUT=/data/input
  AO_OUTPUT=/data/output
  AO_VERBOSE=true

And have them properly recognized without needing to pass flags.

Fixes #17

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

2491 of 7046 relevant lines covered (35.35%)

0.39 hits per line

Source Files on job 20377228161.1
  • Tree
  • List 35
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20377228161
  • 448026b5 on github
  • Prev Job for on master (#20073831450.1)
  • Next Job for on master (#20660927560.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc