Docs: Create ~/.nanbando.yml before running nanbando self-update
Closed this issue · 1 comments
Hi,
If you run nanbando self-update
(or probably any other nanbando command) without having nanbando.yml
in your home directory, you'll get an error:
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException' with message 'The service "storage" has a dependency on a non-existent service "filesystem.remote".' in phar:///usr/local/bin/nanbando/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 58
You could add an additional step to create the file to the docs before running the self-update
command or throw an appropriate Exception if the file is not present
I think there are a few possible solutions for this issue:
- Add an additional step to the docs to make sure that the user adds the file
- Throw an appropriate Exception if the file is not existent
- Create the file with default values if it's not there
thank @afroewis. i will make this file "optional" the local-storage will be default ~/nanando
and if the remote storage is not configured the fetch
and push
command will be disabled. the only problem i have with this solution is that the user wont notice that the file is missing. maybe i will introduce a check
command which would print a warning.