Skip to content

Commit

Permalink
Fix missing space in invalid path error (#1776)
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 <tsmith84@gmail.com>
  • Loading branch information
tas50 authored Sep 18, 2023
1 parent 71c6349 commit 66ce8f3
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:ACCESS_TOKEN@somegitlab.com/vendor/package.git
func gitCloneUrl(url string, credentials []*vault.Credential) (string, error) {

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

0 comments on commit 66ce8f3

Please sign in to comment.