buck2
buck2 copied to clipboard
Access to source root
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.
Do note that in action execution, the working directory will be the project root (and all paths we produce are relative to it).
@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.