Skip to content

Commit 95abb5a

Browse files
committed
changing scope of usegozip
1 parent d9ba064 commit 95abb5a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Azure.Functions.Cli/Helpers/ZipHelper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ public static class ZipHelper
1616
{
1717
public static async Task<Stream> GetAppZipFile(string functionAppRoot, bool buildNativeDeps, BuildOption buildOption, bool noBuild, GitIgnoreParser ignoreParser = null, string additionalPackages = null, bool ignoreDotNetCheck = false)
1818
{
19-
// temporarily provide an escape hatch to use gozip in case there are bugs in the dotnet implementation
20-
bool useGoZip = EnvironmentHelper.GetEnvironmentVariableAsBool(Constants.UseGoZip);
21-
2219
var gitIgnorePath = Path.Combine(functionAppRoot, Constants.FuncIgnoreFile);
2320
if (ignoreParser == null && FileSystemHelpers.FileExists(gitIgnorePath))
2421
{
@@ -49,20 +46,23 @@ public static async Task<Stream> GetAppZipFile(string functionAppRoot, bool buil
4946
else if (GlobalCoreToolsSettings.CurrentWorkerRuntime == WorkerRuntime.dotnet && buildOption == BuildOption.Remote)
5047
{
5148
// Remote build for dotnet does not require bin and obj folders. They will be generated during the oryx build
52-
return await CreateZip(FileSystemHelpers.GetLocalFiles(functionAppRoot, ignoreParser, false, new string[] { "bin", "obj" }), functionAppRoot, Enumerable.Empty<string>(), useGoZip);
49+
return await CreateZip(FileSystemHelpers.GetLocalFiles(functionAppRoot, ignoreParser, false, new string[] { "bin", "obj" }), functionAppRoot, Enumerable.Empty<string>());
5350
}
5451
else
5552
{
5653
var customHandler = await HostHelpers.GetCustomHandlerExecutable();
5754
IEnumerable<string> executables = !string.IsNullOrEmpty(customHandler)
5855
? new[] { customHandler }
5956
: Enumerable.Empty<string>();
60-
return await CreateZip(FileSystemHelpers.GetLocalFiles(functionAppRoot, ignoreParser, false), functionAppRoot, executables, useGoZip);
57+
return await CreateZip(FileSystemHelpers.GetLocalFiles(functionAppRoot, ignoreParser, false), functionAppRoot, executables);
6158
}
6259
}
6360

64-
public static async Task<Stream> CreateZip(IEnumerable<string> files, string rootPath, IEnumerable<string> executables, bool useGoZip = false)
61+
public static async Task<Stream> CreateZip(IEnumerable<string> files, string rootPath, IEnumerable<string> executables)
6562
{
63+
// temporarily provide an escape hatch to use gozip in case there are bugs in the dotnet implementation
64+
bool useGoZip = EnvironmentHelper.GetEnvironmentVariableAsBool(Constants.UseGoZip);
65+
6666
if (useGoZip)
6767
{
6868
if (GoZipExists(out string goZipLocation))

0 commit comments

Comments
 (0)