Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli committed Jun 4, 2024
1 parent b29ec4d commit b029b5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 2 additions & 1 deletion cmd/ftl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"net/url"
"os"
"os/signal"
Expand Down Expand Up @@ -83,7 +84,7 @@ func main() {
ctx = log.ContextWithLogger(ctx, logger)

config, err := projectconfig.LoadConfig(ctx, cli.ConfigFlag)
if err != nil {
if err != nil && !errors.Is(err, os.ErrNotExist) {
kctx.Fatalf(err.Error())
}
kctx.Bind(config)
Expand Down
10 changes: 1 addition & 9 deletions common/projectconfig/merge.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package projectconfig

import (
"errors"
"os"
)

// Merge configuration files.
//
// Config is merged left to right, with later files taking precedence over earlier files.
Expand All @@ -13,10 +8,7 @@ func Merge(paths ...string) (Config, error) {
for _, path := range paths {
partial, err := loadFile(path)
if err != nil {
if !errors.Is(err, os.ErrNotExist) {
return config, err
}
continue
return config, err
}
config = merge(config, partial)
}
Expand Down

0 comments on commit b029b5a

Please sign in to comment.