From 42bacf35e96bc6954f2c41e55a0e28d41a6fdde1 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 18 Sep 2023 11:53:31 -0700 Subject: [PATCH] Fix missing space in invalid path error 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 --- motor/providers/terraform/provider.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/motor/providers/terraform/provider.go b/motor/providers/terraform/provider.go index 85cfe0197b..d28a62e5ae 100644 --- a/motor/providers/terraform/provider.go +++ b/motor/providers/terraform/provider.go @@ -5,7 +5,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "io/fs" "os" "path/filepath" @@ -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() { @@ -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 {