cmd/swarm: trim new lines from files
This commit is contained in:
parent
2c110c81ee
commit
d5837e84ff
@ -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) {
|
|||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user