• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 13083225214

01 Feb 2025 12:41AM UTC coverage: 58.128% (-0.05%) from 58.173%
13083225214

Pull #3092

github

web-flow
Merge 2eb8c4a2f into 2aef3bf3d
Pull Request #3092: Add Custom Config File Support

0 of 6 new or added lines in 1 file covered. (0.0%)

7 existing lines in 2 files now uncovered.

7609 of 13090 relevant lines covered (58.13%)

201.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/utils/flags/config_path.go
1
package flags
2

3
import (
4
        "fmt"
5
        "os"
6

7
        "github.com/go-errors/errors"
8
        "github.com/spf13/afero"
9
        "github.com/supabase/cli/internal/utils"
10
)
11

12
var ConfigFile string
13

14
func LoadConfig(fsys afero.Fs) error {
×
15
        utils.Config.ProjectId = ProjectRef
×
NEW
16

×
NEW
17
        configPath := ""
×
NEW
18
        if ConfigFile != "" {
×
NEW
19
                configPath = ConfigFile
×
NEW
20
        }
×
21

NEW
22
        if err := utils.Config.Load(configPath, utils.NewRootFS(fsys)); err != nil {
×
23
                if errors.Is(err, os.ErrNotExist) {
×
24
                        utils.CmdSuggestion = fmt.Sprintf("Have you set up the project with %s?", utils.Aqua("supabase init"))
×
25
                }
×
26
                return err
×
27
        }
28
        utils.UpdateDockerIds()
×
29
        return nil
×
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc