buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

Access to source root

Open pulanski opened this issue 2 years ago • 3 comments

How does one go about getting access to the source root directory from which buck2 is being invoked. When using Bazel, there is an environment variable BUILD_WORKSPACE_DIRECTORY that can be used to get the location of the source root.

pulanski avatar Apr 13 '23 23:04 pulanski

Do note that in action execution, the working directory will be the project root (and all paths we produce are relative to it).

krallin avatar Apr 14 '23 07:04 krallin

@pulanski - what are you trying to do that requires this information? As @krallin usually you don't need it since you have the working directory. But interested in your use case.

ndmitchell avatar Apr 23 '23 12:04 ndmitchell