Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public String getScript() {
String defaultShell = jenkins.getInjector().getInstance(Shell.DescriptorImpl.class).getShellOrDefault(ws.getChannel());
s = "#!"+defaultShell+" -xe\n" + s;
}
shf.write(s, "UTF-8");
shf.write(s, "CP1047");
shf.chmod(0755);

scriptPath = shf.getRemote();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private static class WriteLog extends MasterToSlaveFileCallable<Long> {
// TODO is this efficient for large amounts of output? Would it be better to stream data, or return a byte[] from the callable?
byte[] buf = new byte[(int) toRead];
raf.readFully(buf);
sink.write(buf);
sink.write(new String(buf, "CP1047").getBytes());
} finally {
raf.close();
}
Expand All @@ -172,7 +172,7 @@ static class StatusCheck extends MasterToSlaveFileCallable<Integer> {
public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
if (f.exists() && f.length() > 0) {
try {
String fileString = Files.readFirstLine(f, Charset.defaultCharset());
String fileString = Files.readFirstLine(f, Charset.forName("CP1047"));
if (fileString == null || fileString.isEmpty()) {
return null;
} else {
Expand Down