Skip to content

It should not matter if flags given before command or after #3959

Closed
@brandon-leapyear

Description

@brandon-leapyear

This happened in a wrapper script, when I'm setting default flags to pass to stack; e.g.

#!/bin/bash
STACK_ARGS=(
    --test --no-run-tests
    --bench --no-run-benchmarks
)
exec stack "${STACK_ARGS[@]}" "$@"

Steps to reproduce

  1. stack --test --no-run-tests build
  2. stack build --test --no-run-tests

Expected

Either both should build tests and not run them or neither should work (since stack doesn't take those flags on its own)

Actual

The first built and ran tests. The second built but didn't run tests.

In other words, stack --test build and stack --test --no-run-tests build do the same thing.

Stack version

Version 1.6.5, Git revision 24ab0d6ff07f28276e082c3ce74dfdeb1a2ca9e9 (5514 commits) x86_64 hpack-0.20.0

Method of installation

From https://github.com/commercialhaskell/stack/releases/download

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions