Open haltcase opened 5 years ago
I think this is actually because of setCommand
which apparently sets the command to run once the nimscript file is run, not the task. So I'll close this since it's probably working as designed even if it's a bit confusing at first.
I think this is actually because of setCommand which apparently sets the command to run once the nimscript file is run, not the task.
Huh? That doesn't right at all.
Not sure if it's ideal but that's how it's currently documented:
https://nim-lang.org/docs/nimscript.html#setCommand%2Cstring%2Cstring
proc setCommand(cmd: string; project = "") {...}
Sets the Nim command that should be continued with after this Nimscript has finished.
Yes, but the code under "task" is only executed that task is executed.
wow, two words missing in my comments above and I'm puzzled as to what I was actually talking about. I must have been pretty tired :)
This said, I don't particularly like these semantics. It is true that setCommand
simply asks Nimble to run a command after the task finishes, but I'm not sure that should also be after the after
block is executed.
Given a task
b
and anafter b: ...
hook, theafter
block runs beforeb
. Repro:https://gist.github.com/citycide/86ddf061c6ada8e0218edaf7119f076e
(Note that you can clone gists as git repos,
git clone https://gist.github.com/86ddf061c6ada8e0218edaf7119f076e.git
)