Skip to content

Commit 6a7cfa5

Browse files
authored
fix: return taskrc config even if there is an error (#2461)
1 parent 74b93f6 commit 6a7cfa5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

experiments/experiments.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@ var xList []Experiment
3333

3434
func Parse(dir string) {
3535
config, _ := taskrc.GetConfig(dir)
36-
3736
ParseWithConfig(dir, config)
3837
}
3938

4039
func ParseWithConfig(dir string, config *ast.TaskRC) {
4140
// Read any .env files
4241
readDotEnv(dir)
43-
4442
// Initialize the experiments
4543
GentleForce = New("GENTLE_FORCE", config, 1)
4644
RemoteTaskfiles = New("REMOTE_TASKFILES", config, 1)

taskrc/taskrc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ func GetConfig(dir string) (*ast.TaskRC, error) {
5959
// Find all the nodes from the given directory up to the users home directory
6060
absDir, err := filepath.Abs(dir)
6161
if err != nil {
62-
return nil, err
62+
return config, err
6363
}
6464
entrypoints, err := fsext.SearchAll("", absDir, defaultTaskRCs)
6565
if err != nil {
66-
return nil, err
66+
return config, err
6767
}
6868

6969
// Reverse the entrypoints since we want the child files to override parent ones

0 commit comments

Comments
 (0)