feat: read workflow config file should join workspace dir (#1850)
This commit is contained in:
parent
77e1931494
commit
aae865dafb
|
|
@ -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…
Reference in New Issue