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:
@@ -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)
|
deployment, err := CreateArchive(client, input, deployArchiveFiles, noZip, insecure, deployChecksum, specDir, specFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error creating source archive")
|
return nil, errors.Wrap(err, "error creating deploy archive")
|
||||||
}
|
}
|
||||||
pkgSpec.Deployment = *deployment
|
pkgSpec.Deployment = *deployment
|
||||||
if len(pkgName) == 0 {
|
if len(pkgName) == 0 {
|
||||||
@@ -165,7 +165,7 @@ func CreatePackage(input cli.Input, client cmd.Client, pkgName string, pkgNamesp
|
|||||||
if len(srcArchiveFiles) > 0 {
|
if len(srcArchiveFiles) > 0 {
|
||||||
source, err := CreateArchive(client, input, srcArchiveFiles, false, insecure, srcChecksum, specDir, specFile)
|
source, err := CreateArchive(client, input, srcArchiveFiles, false, insecure, srcChecksum, specDir, specFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error creating deploy archive")
|
return nil, errors.Wrap(err, "error creating source archive")
|
||||||
}
|
}
|
||||||
pkgSpec.Source = *source
|
pkgSpec.Source = *source
|
||||||
pkgStatus = fv1.BuildStatusPending // set package build status to pending
|
pkgStatus = fv1.BuildStatusPending // set package build status to pending
|
||||||
|
|||||||
Reference in New Issue
Block a user