bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
701 stars 89 forks source link

`bacalhau config set --config=config.yaml <key> <value>` fails if `config.yaml` doesn't exist #4530

Closed frrist closed 1 month ago

frrist commented 1 month ago

Bug Description

This appears to be a regression introduced via https://github.com/bacalhau-project/bacalhau/pull/4466

bacalhau config set --config=config.yaml datadir /some/path
invalid argument "config.yaml" for "-c, --config" flag: the specified configuration file "config.yaml" doesn't exist
wdbaruni commented 1 month ago

Wasn't regression but intentional. if the user miss typed a config file name I would prefer it fails than assuming it wrote to the correct file and create a new one instead

frrist commented 1 month ago

I thought the behavior we wanted was to create a config file if one didn't exist? Right now, the current behavior is that config set will create a config file in the repo is one doesn't exist. But, for example re-suing the above command, bacalhau will not create the config.yaml file.