Skip to content

Ollama spinner is leaking into output, generating invalid commands #1

@JotaRata

Description

@JotaRata

Hello, I encountered an issue when using the script with ollama.

Turns out the little spinner animation present in ollama, writes a sequence of specials characters and carriage returns to stderr, which the script then includes in the stdin in the following line:

llm -m $MODEL "$PROMPT" > $output_file 2>&1 &

This contaminates the output, producing invalid commands fills with ANSI escape sequences. stderr should be redirected to /dev/null instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions