Skip to content

Commit

Permalink
Only mount squashfs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmelsayed committed Jun 7, 2019
1 parent 25c9a76 commit cd9bfca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ private async Task PublishRunFromPackage(Site functionApp, Stream packageStream,
ColoredConsole.WriteLine("Upload completed successfully.");

// Set app setting
await SetRunFromPackageAppSetting(functionApp, sas);
await SetRunFromPackageAppSetting(functionApp, sas, enableMount: fileName.EndsWith("squashfs"));
ColoredConsole.WriteLine("Deployment completed successfully.");
}

Expand Down Expand Up @@ -429,7 +429,7 @@ private async Task WaitForAppSettingUpdateSCM(Site functionApp, IDictionary<stri
throw new CliException("Timed out waiting for SCM to update the Environment Settings");
}

private async Task SetRunFromPackageAppSetting(Site functionApp, string runFromPackageValue)
private async Task SetRunFromPackageAppSetting(Site functionApp, string runFromPackageValue, bool enableMount = false)
{
// Set app setting
functionApp.AzureAppSettings["WEBSITE_RUN_FROM_PACKAGE"] = runFromPackageValue;
Expand All @@ -444,7 +444,7 @@ private async Task SetRunFromPackageAppSetting(Site functionApp, string runFromP
}
}

if (functionApp.IsDynamic && functionApp.IsLinux && !functionApp.AzureAppSettings.ContainsKey("WEBSITE_MOUNT_ENABLED"))
if (functionApp.IsDynamic && functionApp.IsLinux && enableMount && !functionApp.AzureAppSettings.ContainsKey("WEBSITE_MOUNT_ENABLED"))
{
functionApp.AzureAppSettings["WEBSITE_MOUNT_ENABLED"] = "1";
}
Expand Down

0 comments on commit cd9bfca

Please sign in to comment.