--exec --file-watch combo not working as expected #2955

tonyday567 opened this Issue Jan 27, 2017 · 4 comments


None yet

4 participants


Steps to reproduce

Choose a repo and run:

stack build --exec "echo run me, please!" --file-watch

The echo doesn't echo yet. Type 'help'. The executable then runs eg

stack build --exec "echo run me, please!" --file-watch

run me, please!

help: display this help
quit: exit
build: force a rebuild
watched: display watched files
Type help for available commands. Press enter to force a rebuild.

Associated with this, build does not seem to force a build.


I expected the executable to run initially,, before kicking the file-watch cycle in the guts.


the --exec runs after typing help


$ stack --version
Version 1.3.2 x86_64 hpack-0.15.0
mgsloan commented Feb 1, 2017

Hmm, I can't reproduce this behavior. I immediately get:

mgsloan@computer:~/fpco/stack$ stack build --exec "echo run me, please" --file-watch
run me, please
Type help for available commands. Press enter to force a rebuild.

It also works when it needs to do an actual build.

So, not sure what's going on there. Could it have something to do with your terminal setup? That's the only possibility I can think of.

@nrolland @Blaisorblade Since y'all thumbs-up-ed this issue, does that mean you can reproduce it?

@mgsloan mgsloan added the need repro label Feb 1, 2017
nrolland commented Feb 1, 2017 edited

I thumbed up because I was looking at Tonyday567 stuff and that seemed almost perfect except for this issue :)

Just tried with stack compiled with some recent git repo version (stack upgrade --source-only --git), and it does work !

can't repro either


I'm sorry for the enthusiasm, can't repro either.
Regarding "force a rebuild", maybe it's giving the wrong expectations—sometimes I expect it to behave like --force-dirty.


Ahh, yes. The behaviour was on Windows. Just checked on osx and I get the correct ordering of events.

@mgsloan mgsloan added this to the P2: Should milestone Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment