@@ -1087,8 +1087,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1087
1087
return xerrors .Errorf ("read devcontainer config: %w" ,err )
1088
1088
}
1089
1089
1090
- ignore := config .Configuration .Customizations .Coder .Ignore
1091
- if ignore {
1090
+ dcIgnored := config .Configuration .Customizations .Coder .Ignore
1091
+ if dcIgnored {
1092
1092
proc .stop ()
1093
1093
if proc .agent .ID != uuid .Nil {
1094
1094
// Unlock while doing the delete operation.
@@ -1104,7 +1104,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1104
1104
proc .agent = SubAgent {}
1105
1105
proc .containerID = ""
1106
1106
api .injectedSubAgentProcs [dc .WorkspaceFolder ]= proc
1107
- api .ignoredDevcontainers [dc .WorkspaceFolder ]= ignore
1107
+ api .ignoredDevcontainers [dc .WorkspaceFolder ]= dcIgnored
1108
1108
return nil
1109
1109
}
1110
1110
}
@@ -1147,10 +1147,10 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1147
1147
ranSubAgent := false
1148
1148
1149
1149
// Clean up if injection fails.
1150
- var ignored , setIgnored bool
1150
+ var dcIgnored , setDCIgnored bool
1151
1151
defer func () {
1152
- if setIgnored {
1153
- api .ignoredDevcontainers [dc .WorkspaceFolder ]= ignored
1152
+ if setDCIgnored {
1153
+ api .ignoredDevcontainers [dc .WorkspaceFolder ]= dcIgnored
1154
1154
}
1155
1155
if ! ranSubAgent {
1156
1156
proc .stop ()
@@ -1230,8 +1230,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1230
1230
1231
1231
// We only allow ignore to be set in the root customization layer to
1232
1232
// 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 {
1235
1235
return nil
1236
1236
}
1237
1237
@@ -1282,7 +1282,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1282
1282
api .logger .Error (ctx ,"unable to read devcontainer config" ,slog .Error (err ))
1283
1283
}
1284
1284
1285
- if ignored {
1285
+ if dcIgnored {
1286
1286
proc .stop ()
1287
1287
if proc .agent .ID != uuid .Nil {
1288
1288
// If we stop the subagent, we also need to delete it.