privacylab / talek

a Private Publish Subscribe System
BSD 2-Clause "Simplified" License
48 stars 5 forks source link

talekutil has wrong flag variable #89

Closed mixmasala closed 1 year ago

mixmasala commented 1 year ago
./talekutil --replica --incommon common.json --private --index 0 --name zero  --outfile myreplica.json
Could not read input file: open : no such file or directory

when running talekutil, the --incommon flag is not parsed:

diff --git a/cli/talekutil/main.go b/cli/talekutil/main.go
index 953493c..288442f 100644
--- a/cli/talekutil/main.go
+++ b/cli/talekutil/main.go
@@ -112,7 +112,7 @@ func main() {
        tdc = *common.NewTrustDomainConfig(*name, *address, true, false)
    }
    if len(*incommon) > 0 {
-       dat, readerr := ioutil.ReadFile(*infile)
+       dat, readerr := ioutil.ReadFile(*incommon)
        if readerr != nil {
            fmt.Printf("Could not read input file: %v\n", readerr)
            return