Fix the error printing in error handling (#3013)

* 去除environment创建操作中的注释及更新过程中存在的冗余代码

* Remove redundant code and simplify input parsing during HTTPTrigger creation

* Fix error handling in package update logic implementation

* Fix the error printing in error handling

---------

Co-authored-by: yufu huang <yufu.huang@gientech.com>
This commit is contained in:
elastic17
2024-09-13 10:43:41 +05:30
committed by GitHub
co-authored by yufu huang
parent 1f41de9991
commit 5d580e01aa
+2 -2
View File
@@ -155,7 +155,7 @@ func CreatePackage(input cli.Input, client cmd.Client, pkgName string, pkgNamesp
}
deployment, err := CreateArchive(client, input, deployArchiveFiles, noZip, insecure, deployChecksum, specDir, specFile)
if err != nil {
return nil, errors.Wrap(err, "error creating source archive")
return nil, errors.Wrap(err, "error creating deploy archive")
}
pkgSpec.Deployment = *deployment
if len(pkgName) == 0 {
@@ -165,7 +165,7 @@ func CreatePackage(input cli.Input, client cmd.Client, pkgName string, pkgNamesp
if len(srcArchiveFiles) > 0 {
source, err := CreateArchive(client, input, srcArchiveFiles, false, insecure, srcChecksum, specDir, specFile)
if err != nil {
return nil, errors.Wrap(err, "error creating deploy archive")
return nil, errors.Wrap(err, "error creating source archive")
}
pkgSpec.Source = *source
pkgStatus = fv1.BuildStatusPending // set package build status to pending