Просмотр исходного кода

Merge pull request #210 from porter-dev/beta.3.fix-portersvr-version

Beta.3.fix portersvr version
abelanger5 5 лет назад
Родитель
Сommit
ad9f37c78d
2 измененных файлов с 4 добавлено и 3 удалено
  1. 1 1
      cli/cmd/providers/aws/agent.go
  2. 3 2
      cli/cmd/server.go

+ 1 - 1
cli/cmd/providers/aws/agent.go

@@ -134,7 +134,7 @@ func (a *Agent) CreateIAMECRUser(region string) (*PorterAWSCredentials, error) {
 		name = *user.UserName
 	}
 
-	policyArn := "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
+	policyArn := "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess"
 
 	_, err = a.IAMService.AttachUserPolicy(&iam.AttachUserPolicyInput{
 		PolicyArn: &policyArn,

+ 3 - 2
cli/cmd/server.go

@@ -5,6 +5,7 @@ import (
 	"os"
 	"os/exec"
 	"path/filepath"
+	"strings"
 
 	"github.com/fatih/color"
 	"github.com/porter-dev/porter/cli/cmd/docker"
@@ -184,7 +185,7 @@ func startLocal(
 	}
 
 	// otherwise, check the version flag of the binary
-	cmdVersionPorter := exec.Command(cmdPath)
+	cmdVersionPorter := exec.Command(cmdPath, "--version")
 	writer := &versionWriter{}
 	cmdVersionPorter.Stdout = writer
 
@@ -277,7 +278,7 @@ type versionWriter struct {
 }
 
 func (v *versionWriter) Write(p []byte) (n int, err error) {
-	v.Version = string(p)
+	v.Version = strings.TrimSpace(string(p))
 
 	return len(p), nil
 }