Skip to content

Commit 46c1675

Browse files
feat: read workflow config file should join workspace dir (coze-dev#1850)
1 parent 06138ca commit 46c1675

File tree

1 file changed

+6
-1
lines changed
  • backend/application/workflow

1 file changed

+6
-1
lines changed

backend/application/workflow/init.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package workflow
1818

1919
import (
2020
"context"
21+
"path/filepath"
2122

2223
"gopkg.in/yaml.v3"
2324
"os"
@@ -61,7 +62,11 @@ type ServiceComponents struct {
6162
}
6263

6364
func initWorkflowConfig() (workflow.WorkflowConfig, error) {
64-
configBs, err := os.ReadFile("resources/conf/workflow/config.yaml")
65+
wd, err := os.Getwd()
66+
if err != nil {
67+
return nil, err
68+
}
69+
configBs, err := os.ReadFile(filepath.Join(wd, "resources/conf/workflow/config.yaml"))
6570
if err != nil {
6671
return nil, err
6772
}

0 commit comments

Comments
 (0)