mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 15:23:34 +02:00
Respect system TMPDIR in GPG related tests
With https://github.com/bazelbuild/bazel/issues/4376, bazel 0.10.0 now supports accessing system TMPDIR in its sandbox. Use this instead of hardcoding /tmp in BUILD rules to get around the gpg-agent path length restriction. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=186010932
This commit is contained in:
parent
edc50bbe59
commit
7f2e3695a6
2 changed files with 3 additions and 5 deletions
|
@ -84,7 +84,9 @@ public final class GpgSystemCommandRule extends ExternalResource {
|
|||
@Override
|
||||
protected void before() throws IOException, InterruptedException {
|
||||
checkState(Objects.equals(cwd, DEV_NULL));
|
||||
cwd = File.createTempFile(TEMP_FILE_PREFIX, "", null);
|
||||
File tmpRoot = null;
|
||||
tmpRoot = new File(System.getenv("TMPDIR"));
|
||||
cwd = File.createTempFile(TEMP_FILE_PREFIX, "", tmpRoot);
|
||||
cwd.delete();
|
||||
cwd.mkdir();
|
||||
conf = new File(cwd, ".gnupg");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue