private static bool TryCreate(IDictionary env, out Runfiles runfiles) { if (IsManifestOnly(env)) { // On Windows, the launcher sets RUNFILES_MANIFEST_ONLY=1. // On every platform, the launcher also sets RUNFILES_MANIFEST_FILE, but on Linux and macOS it's // faster to use RUNFILES_DIR. { runfiles = new ManifestBased(GetManifestPath(env)); return(true); } } var value = env["RUNFILES_DIR"] as string; if (!string.IsNullOrEmpty(value)) { // bazel, a launcher, or another process has told us where the runfiles are runfiles = new DirectoryBased(value); return(true); } runfiles = null; return(false); }
public string Rlocation(Label label) { if (label.IsRelative) { return(PackagePath(label.Name)); } var rpath = Rpath(label); return(Runfiles.Rlocation(rpath)); }
public LabelRunfiles(Runfiles runfiles, Label defaultPackage) { Runfiles = runfiles; DefaultPackage = defaultPackage; }
public string Rlocation(string path) { return(Runfiles.Rlocation(path)); }
public Dictionary <string, string> GetEnvVars() => Runfiles.GetEnvVars();