Skip to content

lock hold/release messages as part of another command should be printed on stderr #5990

Closed
@Khady

Description

@Khady

information messages such as "Another process has locked" and "lock acquired" should be printed on stderr, not stdout, as they aren't really part of the output of a command.

An example where we caught the problem

opam switch set-invariant --packages=ahrefs-setup,ahrefs-dev-tools-deps,ocaml-base-compiler.$(opam show ocaml-base-compiler --field=installed-version),ahrefs-all-deps

Can end up being executed as

opam switch set-invariant --packages=ahrefs-setup,ahrefs-dev-tools-deps,ocaml-base-compiler.Another process has locked /home/user/monorepo/.opam/repo/state-11ABC690.cache, waiting (C-c to abort)... lock acquired. 4.14.0,ahrefs-all-deps

This is true for lock messages but probably also applied to other informational messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions