<p>I'm using Gradle as the build tool and I need to run helm commands like <code>helm repo add</code> inside a Gradle task. I have tried as below.</p>
<pre><code>      exec {
       workingDir = file(&quot;&lt;Helm.exe location&gt;&quot;)
       CommandLine &quot;helm.exe repo add&quot;
      }
</code></pre>
<p>But this fails with</p>
<pre><code>Error: unknown command &quot;repo add&quot; for &quot;helm&quot;
Run 'helm --help' for usage.
</code></pre>
<p>Any help is much appreciated.</p>

Gihan213
<p>Gradle exec is not doing any processing to the arguments. If you supply <code>&quot;repo add&quot;</code> as argument, helm will receive one argument: <code>&quot;repo add&quot;</code>. This would be the same as calling <code>helm &quot;repo add&quot;</code> in the terminal. What you want to do is, supply two arguments: <code>&quot;repo&quot;, &quot;add&quot;</code>.</p>
<p>For more details see my answer here: <a href="https://stackoverflow.com/questions/74190600/gradle-exec-command-line-difference-between-separated-and-connected-args/74195472#74195472">gradle exec command line: difference between separated and connected args</a></p>
