You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewCliException($"Directory not found to pack: {functionAppRoot}");
37
+
}
38
+
34
39
if(packOptions.NoBuild)
35
40
{
36
41
// For --no-build, treat FolderPath as the build output directory
37
42
if(string.IsNullOrEmpty(packOptions.FolderPath))
38
43
{
39
-
thrownewCliException("When using --no-build for .NET projects, you must specify the path to the build output directory (e.g., ./bin/Release/net8.0/publish)");
44
+
ColoredConsole.WriteLine(WarningColor("No folder path specified. Using current directory as build output directory."));
@@ -78,7 +86,7 @@ public async Task RunAsync(PackOptions packOptions)
78
86
publicoverrideTaskRunAsync()
79
87
{
80
88
// Keep this in case the customer tries to run func pack dotnet, since this subcommand is not meant to be run directly.
81
-
thrownewInvalidOperationException("Invalid command. Please run func pack instead with valid arguments. To see a list of valid arguments, please see func --help.");
[Action(Name="pack",HelpText="Pack function app into a zip that's ready to run.",ShowInHelp=true)]
13
+
[Action(Name="pack",HelpText="Pack function app into a zip that's ready to deploy.",ShowInHelp=true)]
14
14
internalclassPackAction:BaseAction
15
15
{
16
16
privatereadonlyISecretsManager_secretsManager;
@@ -32,17 +32,18 @@ public override ICommandLineParserResult ParseArgs(string[] args)
32
32
{
33
33
Parser
34
34
.Setup<string>('o',"output")
35
-
.WithDescription("output path for the packed archive")
35
+
.WithDescription("Specifies the file path where the packed ZIP archive will be created.")
36
36
.Callback(o =>OutputPath=o);
37
37
38
38
Parser
39
39
.Setup<bool>("no-build")
40
-
.WithDescription("Skip running build for specific language if it is required")
40
+
.WithDescription("Do not build the project before packaging. Optionally provide a directory when func pack as the first argument that has the build contents."+
41
+
"Otherwise, default is the current directory.")
41
42
.Callback(n =>NoBuild=n);
42
43
43
44
Parser
44
45
.Setup<string>("preserve-executables")
45
-
.WithDescription("Comma separated list of executables to indicate which bits are to be set as executable in the zip file.")
46
+
.WithDescription("Comma - separated list of executable files to specify which files should be set as executable in the zip archive.")
0 commit comments