diff --git a/builder/amazon/common/step_key_pair.go b/builder/amazon/common/step_key_pair.go index 55f5aace7..927101fcf 100644 --- a/builder/amazon/common/step_key_pair.go +++ b/builder/amazon/common/step_key_pair.go @@ -6,7 +6,6 @@ import ( "io/ioutil" "os" "runtime" - "strings" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/packer/helper/multistep" @@ -37,7 +36,7 @@ func (s *StepKeyPair) Run(_ context.Context, state multistep.StateBag) multistep } state.Put("keyPair", s.KeyPairName) - state.Put("privateKey", strings.TrimSpace(string(privateKeyBytes))) + state.Put("privateKey", string(privateKeyBytes)) return multistep.ActionContinue } diff --git a/builder/oracle/classic/builder.go b/builder/oracle/classic/builder.go index 9264e6466..8537289cf 100644 --- a/builder/oracle/classic/builder.go +++ b/builder/oracle/classic/builder.go @@ -35,8 +35,7 @@ func (b *Builder) Prepare(rawConfig ...interface{}) ([]string, error) { } func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) { - - loggingEnabled := os.Getenv("PACKER_OCI_CLASSIC_LOGGING")) != "" + loggingEnabled := os.Getenv("PACKER_OCI_CLASSIC_LOGGING") != "" httpClient := cleanhttp.DefaultClient() config := &opc.Config{ Username: opc.String(b.config.Username),