Skip to content

Commit

Permalink
Resolving analyzer warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Sep 16, 2023
1 parent ffc5943 commit bcb787d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public static async Task UsingScopeAsync(
httpContextAccessor.HttpContext = shellScope.ShellContext.CreateHttpContext();
var httpContext = httpContextAccessor.HttpContext;

// Seems to be a false positive warning. IDE thinks that left hand side can't be null.
#pragma warning disable S2583 // Conditionally executed code should be reachable
httpContext.Request.PathBase = "/" + shellHost.GetSettings(tenant).RequestUrlPrefix ?? string.Empty;
#pragma warning restore S2583 // Conditionally executed code should be reachable
httpContext.Features.Set(new RecipeEnvironmentFeature());

await shellScope.UsingAsync(execute, activateShell);
Expand Down

0 comments on commit bcb787d

Please sign in to comment.