nucypher / nucypher-ops

GNU General Public License v3.0
3 stars 8 forks source link

Usage of --cli flag is unintentionaly persistent #20

Open KPrasch opened 1 year ago

KPrasch commented 1 year ago

If an ursula is launched with the --cli/-c option, the value is written ti the disk and subsequent runs remember the previous run's launch flags - even if they are invalid.

Attempting to launch on mumbai with the wring flag name by accident:

 nucypher-ops ursula update --nucypher-image nucypher/nucypher:lynx  ... --cli eth-provider-uri=https://polygon-mumbai.infura.io/v3/... --cli network=mumbai
...
Error: No such option: --eth-provider-uri (Possible options: --eth-provider, --payment-provider)
Usage: nucypher ursula run [OPTIONS]
Try 'nucypher ursula run --help' for help.

Fixed eth-provider-uri -> eth-provider but the error persists because the flags key/value pair is loaded from the disk.

 nucypher-ops ursula update --nucypher-image nucypher/nucypher:lynx  ... --cli eth-provider=https://polygon-mumbai.infura.io/v3/... --cli network=mumbai
...
Error: No such option: --eth-provider-uri (Possible options: --eth-provider, --payment-provider)
Usage: nucypher ursula run [OPTIONS]
Try 'nucypher ursula run --help' for help.