Skip to content
Permalink
Browse files
[FIXED JENKINS-21772] Only cache CLI credentials in ~/.hudson if it e…
…xists.
  • Loading branch information
daniel-beck authored and vjuranek committed Feb 12, 2014
1 parent 6e8278b commit 237dda40e08f4db759e965738b1b9b3755525161
Showing with 5 additions and 1 deletion.
  1. +5 −1 core/src/main/java/hudson/cli/ClientAuthenticationCache.java
@@ -43,7 +43,11 @@ public ClientAuthenticationCache(Channel channel) throws IOException, Interrupte
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()) {

0 comments on commit 237dda4

Please sign in to comment.