提交 237dda40 编写于 作者: D Daniel Beck 提交者: Vojtech Juranek

[FIXED JENKINS-21772] Only cache CLI credentials in ~/.hudson if it exists.

上级 6e8278bb
......@@ -43,7 +43,11 @@ public class ClientAuthenticationCache implements Serializable {
store = (channel==null ? MasterComputer.localChannel : channel).call(new Callable<FilePath, IOException>() {
public FilePath call() throws IOException {
File home = new File(System.getProperty("user.home"));
return new FilePath(new File(home, ".hudson/cli-credentials"));
File hudsonHome = new File(home, ".hudson");
if (hudsonHome.exists()) {
return new FilePath(new File(hudsonHome, "cli-credentials"));
}
return new FilePath(new File(home, ".jenkins/cli-credentials"));
}
});
if (store.exists()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册