Skip to content

gorgeEx would drop tailing newline from outputStream on non-windows #25092

@litlighilit

Description

@litlighilit

Nim Version

Nim 2.2.4

And

Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2025-08-08
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: 02e3487c9c95b5faa186292a7ea682671f06c035
active boot switches: -d:release -d:nimUseLinenoise

Description

Current gorgeEx's output just never endswith \n, even if it should do.

e,g,

static: echo gorgeEx("echo")

Current Output

(output: "", exitCode: 0)

Expected Output

(output: "\n", exitCode: 0)

Known Workarounds

No response

Additional Information

To compare,

import std/osproc
echo execShellEx("echo")

gives

(output: "\n", exitCode: 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions