Commit d5837e84 authored by Anton Evangelatov's avatar Anton Evangelatov

cmd/swarm: trim new lines from files

parent 2c110c81
...@@ -130,7 +130,7 @@ func accessNewACT(ctx *cli.Context) { ...@@ -130,7 +130,7 @@ func accessNewACT(ctx *cli.Context) {
if err != nil { if err != nil {
utils.Fatalf("had an error reading the grantee public key list") utils.Fatalf("had an error reading the grantee public key list")
} }
pkGrantees = strings.Split(string(bytes), "\n") pkGrantees = strings.Split(strings.Trim(string(bytes), "\n"), "\n")
} }
if passGranteesFilename != "" { if passGranteesFilename != "" {
...@@ -138,7 +138,7 @@ func accessNewACT(ctx *cli.Context) { ...@@ -138,7 +138,7 @@ func accessNewACT(ctx *cli.Context) {
if err != nil { if err != nil {
utils.Fatalf("could not read password filename: %v", err) utils.Fatalf("could not read password filename: %v", err)
} }
passGrantees = strings.Split(string(bytes), "\n") passGrantees = strings.Split(strings.Trim(string(bytes), "\n"), "\n")
} }
accessKey, ae, actManifest, err = api.DoACT(ctx, privateKey, salt, pkGrantees, passGrantees) accessKey, ae, actManifest, err = api.DoACT(ctx, privateKey, salt, pkGrantees, passGrantees)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment