diff --git a/plugin.go b/plugin.go index a9f94c7..4f7f7a8 100644 --- a/plugin.go +++ b/plugin.go @@ -61,7 +61,7 @@ func (p Plugin) Exec() error { // Install a extra PEM key if required if len(os.Getenv("PEM_NAME")) > 0 { - fmt.Println("--- Setting a pem file") + fmt.Println("--- Setting a pem file ---") value, exists := os.LookupEnv("PEM_CONTENTS") if !exists { value = "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n" @@ -75,7 +75,7 @@ func (p Plugin) Exec() error { // Install a Github SSH key if len(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) > 0 { - fmt.Println("--- Setting a Github key") + fmt.Println("--- Setting a Github key ---") sshconfErr := installGithubSsh(os.Getenv("GITHUB_PRIVATE_SSH_KEY")) if sshconfErr != nil { @@ -84,7 +84,7 @@ func (p Plugin) Exec() error { } // Install an AWS profile if env var is set - fmt.Println("--- Setting an AWS profile") + fmt.Println("--- Setting an AWS profile ---") if len(os.Getenv("AWS_ACCESS_KEY_ID")) > 0 { profileErr := installProfile(os.Getenv("AWS_PROFILE"), os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY")) diff --git a/terraform.go b/terraform.go index e9e4fed..7d47c2e 100644 --- a/terraform.go +++ b/terraform.go @@ -18,6 +18,7 @@ type ( ) func installExtraPem(pemName string, pemContents string) error { + os.Mkdir(os.Getenv("HOME")+"/.ssh", 0700) err := ioutil.WriteFile(os.Getenv("HOME")+"/.ssh/"+pemName, []byte(pemContents), 0600) if err != nil { return err