Skip to content

Commit

Permalink
G2-1660 Set file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgib committed Oct 25, 2024
1 parent d06d992 commit 0c4040f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -48,6 +50,13 @@ public void before() {
throw new RuntimeIOException("Failed to download clireport", e);
}
HAssert.assertTrue(Files.exists(cliReport));
try {
Files.setPosixFilePermissions(cliReport, EnumSet.allOf(PosixFilePermission.class));
} catch (UnsupportedOperationException e) {
// Ignore this - it's not required on platforms where it's not supported
} catch (IOException e) {
throw new RuntimeIOException("Failed to mark clireport executable", e);
}
}
}

Expand Down

0 comments on commit 0c4040f

Please sign in to comment.