Skip to content

refactor: extract shared read-file-to-string helper (63 occurrences) #745

@chaliy

Description

@chaliy

Severity: LOW | Type: Missing Utility | Effort: Small

Nearly every file-reading builtin repeats the same fs.read_file + String::from_utf8_lossy + error formatting pattern (63 occurrences).

Proposed fix: async fn read_text_file(fs, path, cmd_name) -> Result<String, ExecResult> shared helper.

Ref: specs/015-technical-debt.md #19

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt items

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions