gevulotnetwork / gevulot

Gevulot is an internet scale compute network for zero-knowledge proof generation and verification.
https://gevulot.com
Apache License 2.0
154 stars 48 forks source link

Fix flag param handling in gevulot-cli #201

Closed tuommaki closed 4 months ago

koxu1996 commented 2 months ago

This PR should not go unnoticed, as it introduced important workaround for passing single value args.

My case study

I wanted to pass foo -- bar args, so I used the following tasks' cmd_args when calling gevulot-cli exec

[{ "name": "foo", "value": "" }, { "name": "", "value": "--" }, { "name": "bar", "value": "" }]

Here is the request that was sent with CLI - request-1.json:

     ...
              "args": ["foo", "", "", "--", "bar", ""],
     ...

I was not expecting those empty strings :crying_cat_face:.

The solution was to update the CLI tool with cargo install --git https://github.com/gevulotnetwork/gevulot.git gevulot-cli (from #bbe20d41 to #700d759a).

Request after update - request-2.json:

     ...
              "args": ["foo", "--", "bar"],
     ...

Now everything works as expected!