Skip to content

Print warnings to stderr, not stdout #256

@hdgarrood

Description

@hdgarrood

At the moment I'm using spago sources to build a list of source globs which I then pass to purs directly. This mostly works great, except for the fact that some warnings get printed to stdout, which confuses things:

$ spago sources 2>/dev/null
WARNING: wasn't able to check if your package set file is frozen
.spago/aff/v5.1.1/src/**/*.purs
.spago/aff-coroutines/v7.0.0/src/**/*.purs
.spago/arrays/v5.3.0/src/**/*.purs
.spago/avar/v3.0.0/src/**/*.purs
.spago/bifunctors/v4.0.0/src/**/*.purs

This leads to a bunch of warnings such as:

> set -o noglob && purs compile $(npm run --silent sources:purs | tr '\n' ' ')

purs compile: No files found using pattern: WARNING:
purs compile: No files found using pattern: wasn't
purs compile: No files found using pattern: able
purs compile: No files found using pattern: to
purs compile: No files found using pattern: check
purs compile: No files found using pattern: if
purs compile: No files found using pattern: your
purs compile: No files found using pattern: package
purs compile: No files found using pattern: set
purs compile: No files found using pattern: file
purs compile: No files found using pattern: is
purs compile: No files found using pattern: frozen

Incidentally, once #173 is a thing I can probably just use that and not need to worry about this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions