Skip to content

Commit

Permalink
Fix a bug in MockToolsConfig#copyTool that causes an extra line to …
Browse files Browse the repository at this point in the history
…be written.

PiperOrigin-RevId: 435111464
  • Loading branch information
justinhorvitz authored and Copybara-Service committed Mar 16, 2022
1 parent 353ea10 commit bd35a08
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.util.FileSystems;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.annotation.Nullable;

/**
Expand Down Expand Up @@ -160,7 +159,7 @@ public void copyTool(String relativePath) throws IOException {
public void copyTool(String relativePath, String dest) throws IOException {
Path runfiles = FileSystems.getNativeFileSystem().getPath(BlazeTestUtils.runfilesDir());
Path source = runfiles.getRelative(TestConstants.WORKSPACE_NAME).getRelative(relativePath);
create(dest, FileSystemUtils.readContent(source, StandardCharsets.ISO_8859_1));
create(dest, FileSystemUtils.readLinesAsLatin1(source).toArray(String[]::new));
}

/**
Expand Down

0 comments on commit bd35a08

Please sign in to comment.