8000 consistency · coder/coder@5fc578e · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fc578e

Browse files
committed
consistency
1 parent 700a00c commit 5fc578e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

agent/agentcontainers/api.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
10871087
return xerrors.Errorf("read devcontainer config: %w", err)
10881088
}
10891089

1090-
ignore := config.Configuration.Customizations.Coder.Ignore
1091-
if ignore {
1090+
dcIgnored := config.Configuration.Customizations.Coder.Ignore
1091+
if dcIgnored {
10921092
proc.stop()
10931093
if proc.agent.ID != uuid.Nil {
10941094
// Unlock while doing the delete operation.
@@ -1104,7 +1104,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
11041104
proc.agent = SubAgent{}
11051105
proc.containerID = ""
11061106
api.injectedSubAgentProcs[dc.WorkspaceFolder] = proc
1107-
api.ignoredDevcontainers[dc.WorkspaceFolder] = ignore
1107+
api.ignoredDevcontainers[dc.WorkspaceFolder] = dcIgnored
11081108
return nil
11091109
}
11101110
}
@@ -1147,10 +1147,10 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
11471147
ranSubAgent := false
11481148

11491149
// Clean up if injection fails.
1150-
var ignored, setIgnored bool
1150+
var dcIgnored, setDCIgnored bool
11511151
defer func() {
1152-
if setIgnored {
1153-
api.ignoredDevcontainers[dc.WorkspaceFolder] = ignored
1152+
if setDCIgnored {
1153+
api.ignoredDevcontainers[dc.WorkspaceFolder] = dcIgnored
11541154
}
11551155
if !ranSubAgent {
11561156
proc.stop()
@@ -1230,8 +1230,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
12301230

12311231
// We only allow ignore to be set in the root customization layer to
12321232
// prevent weird interactions with devcontainer features.
1233-
ignored, setIgnored = config.Configuration.Customizations.Coder.Ignore, true
1234-
if ignored {
1233+
dcIgnored, setDCIgnored = config.Configuration.Customizations.Coder.Ignore, true
1234+
if dcIgnored {
12351235
return nil
12361236
}
12371237

@@ -1282,7 +1282,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
12821282
api.logger.Error(ctx, "unable to read devcontainer config", slog.Error(err))
12831283
}
12841284

1285-
if ignored {
1285+
if dcIgnored {
12861286
proc.stop()
12871287
if proc.agent.ID != uuid.Nil {
12881288
// If we stop the subagent, we also need to delete it.

0 commit comments

Comments
 (0)
0