Skip to content

Commit

Permalink
Fix WORKSPACE file existence hermeticity
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=93901785
  • Loading branch information
kchodorow authored and damienmg committed May 18, 2015
1 parent 3e66823 commit 88311f8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public class WorkspaceFileFunction implements SkyFunction {
public SkyValue compute(SkyKey skyKey, Environment env) throws WorkspaceFileFunctionException,
InterruptedException {
RootedPath workspaceRoot = (RootedPath) skyKey.argument();
if (env.getValue(FileValue.key(workspaceRoot)) == null) {
FileValue workspaceFileValue = (FileValue) env.getValue(FileValue.key(workspaceRoot));
if (workspaceFileValue == null) {
return null;
}

Expand All @@ -85,7 +86,7 @@ public SkyValue compute(SkyKey skyKey, Environment env) throws WorkspaceFileFunc
}
parseWorkspaceFile(installDir.getRelative(workspaceFile), builder);
}
if (!repoWorkspace.exists()) {
if (!workspaceFileValue.exists()) {
return new PackageValue(builder.build());
}
parseWorkspaceFile(repoWorkspace, builder);
Expand Down

0 comments on commit 88311f8

Please sign in to comment.