@@ -1141,8 +1141,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1141
1141
return xerrors .Errorf ("read devcontainer config: %w" ,err )
1142
1142
}
1143
1143
1144
- ignore := config .Configuration .Customizations .Coder .Ignore
1145
- if ignore {
1144
+ dcIgnored := config .Configuration .Customizations .Coder .Ignore
1145
+ if dcIgnored {
1146
1146
proc .stop ()
1147
1147
if proc .agent .ID != uuid .Nil {
1148
1148
// Unlock while doing the delete operation.
@@ -1158,7 +1158,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1158
1158
proc .agent = SubAgent {}
1159
1159
proc .containerID = ""
1160
1160
api .injectedSubAgentProcs [dc .WorkspaceFolder ]= proc
1161
- api .ignoredDevcontainers [dc .WorkspaceFolder ]= ignore
1161
+ api .ignoredDevcontainers [dc .WorkspaceFolder ]= dcIgnored
1162
1162
return nil
1163
1163
}
1164
1164
}
@@ -1201,10 +1201,10 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1201
1201
ranSubAgent := false
1202
1202
1203
1203
// Clean up if injection fails.
1204
- var ignored , setIgnored bool
1204
+ var dcIgnored , setDCIgnored bool
1205
1205
defer func () {
1206
- if setIgnored {
1207
- api .ignoredDevcontainers [dc .WorkspaceFolder ]= ignored
1206
+ if setDCIgnored {
1207
+ api .ignoredDevcontainers [dc .WorkspaceFolder ]= dcIgnored
1208
1208
}
1209
1209
if ! ranSubAgent {
1210
1210
proc .stop ()
@@ -1284,8 +1284,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1284
1284
1285
1285
// We only allow ignore to be set in the root customization layer to
1286
1286
// 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 {
1289
1289
return nil
1290
1290
}
1291
1291
@@ -1337,7 +1337,7 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
1337
1337
api .logger .Error (ctx ,"unable to read devcontainer config" ,slog .Error (err ))
1338
1338
}
1339
1339
1340
- if ignored {
1340
+ if dcIgnored {
1341
1341
proc .stop ()
1342
1342
if proc .agent .ID != uuid .Nil {
1343
1343
// If we stop the subagent, we also need to delete it.