Skip to content

🐛 [BUG] uteke_home() panics when home directory cannot be determined #226

Closed

Description

@ajianaz

Description

uteke_home() uses .expect() which panics at runtime if dirs::home_dir() returns None. This can happen in:

  • Minimal Docker containers without HOME set
  • CI environments
  • Systems with misconfigured user directories

Affected Code

  • crates/uteke-core/src/lib.rs line 122

Fix

Change return type to Result<PathBuf, Error> and return an error instead of panicking. Update all callers.

Found by Cora v0.4.4 scan.

Activity

  1. added
    bug
    scope:core
    priority:high
    cora-scan
    on Jun 7, 2026
  2. ajianaz commented on Jun 7, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in v0.0.11 (PR #234)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcora-scanpriority:highscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions