Skip to content

Commit c0507a5

Browse files
Pass --no-auto-update to CLI across all SDKs
Prevents the CLI from auto-updating itself, ensuring the version bundled with the SDK is the version that runs.
1 parent 5eefbef commit c0507a5

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

dotnet/src/Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ private async Task VerifyProtocolVersionAsync(Connection connection, Cancellatio
883883
args.AddRange(options.CliArgs);
884884
}
885885

886-
args.AddRange(["--headless", "--log-level", options.LogLevel]);
886+
args.AddRange(["--headless", "--no-auto-update", "--log-level", options.LogLevel]);
887887

888888
if (options.UseStdio)
889889
{

go/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ func (c *Client) verifyProtocolVersion(ctx context.Context) error {
13131313
// This spawns the CLI server as a subprocess using the configured transport
13141314
// mode (stdio or TCP).
13151315
func (c *Client) startCLIServer(ctx context.Context) error {
1316-
args := []string{"--headless", "--log-level", c.options.LogLevel}
1316+
args := []string{"--headless", "--no-auto-update", "--log-level", c.options.LogLevel}
13171317

13181318
// Choose transport mode
13191319
if c.useStdio {

nodejs/src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,7 @@ export class CopilotClient {
986986
const args = [
987987
...this.options.cliArgs,
988988
"--headless",
989+
"--no-auto-update",
989990
"--log-level",
990991
this.options.logLevel,
991992
];

python/copilot/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ async def _start_cli_server(self) -> None:
11161116
if not os.path.exists(cli_path):
11171117
raise RuntimeError(f"Copilot CLI not found at {cli_path}")
11181118

1119-
args = ["--headless", "--log-level", self.options["log_level"]]
1119+
args = ["--headless", "--no-auto-update", "--log-level", self.options["log_level"]]
11201120

11211121
# Add auth-related flags
11221122
if self.options.get("github_token"):

0 commit comments

Comments
 (0)