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

Skip to content

Commit 2807a9d

Browse files
committed
consistency
1 parent e72c98f commit 2807a9d

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
@@ -1141,8 +1141,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
11411141
return xerrors.Errorf("read devcontainer config: %w", err)
11421142
}
11431143

1144-
ignore := config.Configuration.Customizations.Coder.Ignore
1145-
if ignore {
1144+
dcIgnored := config.Configuration.Customizations.Coder.Ignore
1145+
if dcIgnored {
11461146
proc.stop()
11471147
if proc.agent.ID != uuid.Nil {
11481148
// Unlock while doing the delete operation.
@@ -1158,7 +1158,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
11581158
proc.agent = SubAgent{}
11591159
proc.containerID = ""
11601160
api.injectedSubAgentProcs[dc.WorkspaceFolder] = proc
1161-
api.ignoredDevcontainers[dc.WorkspaceFolder] = ignore
1161+
api.ignoredDevcontainers[dc.WorkspaceFolder] = dcIgnored
11621162
return nil
11631163
}
11641164
}
@@ -1201,10 +1201,10 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
12011201
ranSubAgent := false
12021202

12031203
// Clean up if injection fails.
1204-
var ignored, setIgnored bool
1204+
var dcIgnored, setDCIgnored bool
12051205
defer func() {
1206-
if setIgnored {
1207-
api.ignoredDevcontainers[dc.WorkspaceFolder] = ignored
1206+
if setDCIgnored {
1207+
api.ignoredDevcontainers[dc.WorkspaceFolder] = dcIgnored
12081208
}
12091209
if !ranSubAgent {
12101210
proc.stop()
@@ -1284,8 +1284,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
12841284

12851285
// We only allow ignore to be set in the root customization layer to
12861286
// prevent weird interactions with devcontainer features.
1287-
ignored, setIgnored = config.Configuration.Customizations.Coder.Ignore, true
1288-
if ignored {
1287+
dcIgnored, setDCIgnored = config.Configuration.Customizations.Coder.Ignore, true
1288+
if dcIgnored {
12891289
return nil
12901290
}
12911291

@@ -1337,7 +1337,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
13371337
api.logger.Error(ctx, "unable to read devcontainer config", slog.Error(err))
13381338
}
13391339

1340-
if ignored {
1340+
if dcIgnored {
13411341
proc.stop()
13421342
if proc.agent.ID != uuid.Nil {
13431343
// If we stop the subagent, we also need to delete it.

0 commit comments

Comments
 (0)
0