feat: read workflow config file should join workspace dir (#1850)

main
Zhj 2 months ago committed by GitHub
parent 77e1931494
commit aae865dafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      backend/application/workflow/init.go

@ -18,6 +18,7 @@ package workflow
import ( import (
"context" "context"
"path/filepath"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
"os" "os"
@ -61,7 +62,11 @@ type ServiceComponents struct {
} }
func initWorkflowConfig() (workflow.WorkflowConfig, error) { func initWorkflowConfig() (workflow.WorkflowConfig, error) {
configBs, err := os.ReadFile("resources/conf/workflow/config.yaml") wd, err := os.Getwd()
if err != nil {
return nil, err
}
configBs, err := os.ReadFile(filepath.Join(wd, "resources/conf/workflow/config.yaml"))
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save