Closed thomasquinn closed 3 weeks ago
yeah I think we could adapt the cwd rule to substitute the two env vars in here rather than duplicating it entirely. I think I might want to call the alternative setup here workspace_root
or workspace
rather than bwd
-- cwd
has a standard meaning on *nix systems which is why I abbreviated.
Sounds good, I'll update the PR with those changes.
Let me know if this is closer to what you had in mind.
This PR adds a rule which is identical to
cwd
, except that it runs the tool inBUILD_WORKSPACE_DIRECTORY
instead ofBUILD_WORKING_DIRECTORY
. There are some tools which should always be run from the module/workspace root and I think it would be useful to add a convenience rule for this.The code is largely copied from the
cwd
implementation, so there may be some opportunity to deduplicate some of it. You may also have a better name in mind thanbwd
😄