Ability to disable credential helper provided by TeamCity
[teamcity/git-plugin.git] / git-agent / src / jetbrains / buildServer / buildTriggers / vcs / git / agent / BuildContext.java
index 32f4b5c4249d184b0c611532a5494bf7bb435fa5..704c936f32a1a706fa2309da5261ac66f87b5a0d 100644 (file)
@@ -25,9 +25,12 @@ import org.jetbrains.annotations.Nullable;
 public class BuildContext implements Context {
 
   private final AgentRunningBuild myBuild;
+  private final AgentPluginConfig myConfig;
 
-  public BuildContext(@NotNull AgentRunningBuild build) {
+  public BuildContext(@NotNull AgentRunningBuild build,
+                      @NotNull AgentPluginConfig config) {
     myBuild = build;
+    myConfig = config;
   }
 
   @Nullable
@@ -43,4 +46,9 @@ public class BuildContext implements Context {
       return value;
     return null;
   }
+
+  @Override
+  public boolean isProvideCredHelper() {
+    return myConfig.isProvideCredHelper();
+  }
 }