■ ■ ■ ■ ■ ■
src/main/java/io/onedev/agent/AgentSocket.java
| skipped 84 lines |
85 | 85 | | } |
86 | 86 | | |
87 | 87 | | File wrapperConfFile = new File(Agent.installDir, "conf/wrapper.conf"); |
88 | | - | String wrapperConfContent = FileUtils.readFileToString(wrapperConfFile, StandardCharsets.UTF_8); |
89 | | - | FileUtils.writeStringToFile( |
90 | | - | wrapperConfFile, |
91 | | - | wrapperConfContent.replace("../lib/" + Agent.version + "/", "../lib/" + versionAtServer + "/"), |
92 | | - | StandardCharsets.UTF_8); |
| 88 | + | String wrapperConf = FileUtils.readFileToString(wrapperConfFile, StandardCharsets.UTF_8); |
| 89 | + | wrapperConf = wrapperConf.replace("../lib/" + Agent.version + "/", "../lib/" + versionAtServer + "/"); |
| 90 | + | FileUtils.writeStringToFile(wrapperConfFile, wrapperConf, StandardCharsets.UTF_8); |
93 | 91 | | } |
94 | 92 | | } finally { |
95 | 93 | | client.close(); |
| skipped 146 lines |