Skip to content

Commit

Permalink
Fix missing space in invalid path error
Browse files Browse the repository at this point in the history
Add the missing space to errors like this:

```
x could not connect to asset error="path 'https://gitlab.com/mondoolabs/example-gitlab.git'is not a valid file or directory" asset=
```

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Sep 18, 2023
1 parent 602bef1 commit 42bacf3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions motor/providers/terraform/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"

"io/fs"
"os"
"path/filepath"
Expand Down Expand Up @@ -97,7 +96,7 @@ func New(tc *providers.Config) (*Provider, error) {
projectPath = path
stat, err := os.Stat(path)
if os.IsNotExist(err) {
return nil, errors.New("path '" + path + "'is not a valid file or directory")
return nil, errors.New("path '" + path + "' is not a valid file or directory")
}

if stat.IsDir() {
Expand Down Expand Up @@ -245,7 +244,6 @@ var reGitHttps = regexp.MustCompile(`git\+https://([^/]+)/(.*)`)
// If a token is provided, it will be used to clone the repo
// gitlab: git clone https://oauth2:[email protected]/vendor/package.git
func gitCloneUrl(url string, credentials []*vault.Credential) (string, error) {

user := ""
token := ""
for i := range credentials {
Expand Down

0 comments on commit 42bacf3

Please sign in to comment.