Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchitmehta committed Jul 30, 2020
1 parent ab7462f commit 483cd93
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
5 changes: 1 addition & 4 deletions Kudu.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,14 @@ private static IEnvironment GetEnvironment(string siteRoot, string requestId)
string binPath = System.Environment.GetEnvironmentVariable("SCM_BIN_PATH");
if (string.IsNullOrWhiteSpace(binPath))
{
// CORE TODO Double check. Process.GetCurrentProcess() always gets the dotnet.exe process,
// so changed to Assembly.GetEntryAssembly().Location
binPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
}

// CORE TODO Handing in a null IHttpContextAccessor (and KuduConsoleFullPath) again
return new Kudu.Core.Environment(root,
EnvironmentHelper.NormalizeBinPath(binPath),
repositoryPath,
requestId,
Path.Combine(AppContext.BaseDirectory, "KuduConsole", "kudu.dll"),
Path.Combine(AppContext.BaseDirectory, "KuduConsole", "kudu"),
null,
new FileSystemPathProvider(new NullMeshPersistentFileSystem()));
}
Expand Down
2 changes: 1 addition & 1 deletion Kudu.Contracts/IEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface IEnvironment
string FunctionsPath { get; } // e.g. /site/wwwroot
string AppBaseUrlPrefix { get; } // e.g. siteName.azurewebsites.net
string RequestId { get; } // e.g. x-arr-log-id or x-ms-request-id header value
string KuduConsoleFullPath { get; } // e.g. KuduConsole/kudu.dll
string KuduConsoleFullPath { get; } // e.g. KuduConsole/kudu
string SitePackagesPath { get; } // e.g. /data/SitePackages
bool IsOnLinuxConsumption { get; } // e.g. True on Linux Consumption. False on App Service.
}
Expand Down
14 changes: 0 additions & 14 deletions Kudu.Services.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,6 @@ public void ConfigureServices(IServiceCollection services)

services.AddScoped<ICommandExecutor, CommandExecutor>();

// KuduWebUtil.MigrateSite(environment, noContextDeploymentsSettingsManager);
// RemoveOldTracePath(environment);
// RemoveTempFileFromUserDrive(environment);

// CORE TODO Windows Fix: Temporary fix for https://github.com/npm/npm/issues/5905
//EnsureNpmGlobalDirectory();
//EnsureUserProfileDirectory();

//// Skip SSL Certificate Validate
//if (Environment.SkipSslValidation)
//{
// ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
//}

//// Make sure webpages:Enabled is true. Even though we set it in web.config, it could be overwritten by
//// an Azure AppSetting that's supposed to be for the site only but incidently affects Kudu as well.
ConfigurationManager.AppSettings["webpages:Enabled"] = "true";
Expand Down

0 comments on commit 483cd93

Please sign in to comment.