Skip to content

The command "stack --nix exec cmd --" passes unexpected arguments. #1536

@peti

Description

@peti

See https://gist.github.com/peti/ed64f5a9ac193690ec10 for an easily reproducible test case. Basically, the command

$ stack --nix build stack-bug
$ stack --nix exec stack-bug
[]

executes the stack-bug command without any arguments -- like you'd expect. The command

$ stack --nix exec stack-bug --
["--extra-lib-dirs=/nix/store/j1q555xv31177kg9ncc9y0p3xaqbq1gf-ghc-7.10.2/lib","--extra-include-dirs=/nix/store/j1q555xv31177kg9ncc9y0p3xaqbq1gf-ghc-7.10.2/include"]

however, does not. Instead, it adds additional flags that look like they're intended for cabal configure.

This means that it's basically impossible to pass command line options to programs executed via stack --nix exec ....

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