Skip to content

Commit 22b182a

Browse files
revert: restore validate.go to avoid coverage drop
1 parent de9f21c commit 22b182a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

command/config/validate/validate.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"errors"
66
"fmt"
7+
"io/ioutil"
78
"os"
89
"os/exec"
910
"path/filepath"
@@ -59,9 +60,9 @@ func (o *Options) Run() error {
5960
}
6061

6162
// Read the config in the form of string and send it
62-
content, err := os.ReadFile(configPath)
63+
content, err := ioutil.ReadFile(configPath)
6364
if err != nil {
64-
return fmt.Errorf("error occurred while reading DeepSource config file %s: %w", configPath, err)
65+
return errors.New("Error occured while reading DeepSource config file. Exiting...")
6566
}
6667

6768
// Fetch the client
@@ -132,7 +133,7 @@ func extractDSConfigPath() (string, error) {
132133
return "", errors.New("Error occured while looking for DeepSource config file. Exiting...")
133134
} else {
134135
// If found, use this as configpath
135-
configPath = filepath.Join(path, ".deepsource.toml")
136+
configPath = filepath.Join(path, "/.deepsource.toml")
136137
}
137138
}
138139
return configPath, nil

0 commit comments

Comments
 (0)