virtualzone/onedrive-uploader

Could not read config: open ./config.json: no such file or directory

poweryu opened this issue · 5 comments

I installed onedrive-uploader, config.json and secret.json in /home/user/.local/bin/ directory, it works fine in this directory,and when I run them in other directories, it will prompt:Could not read config: open ./config.json: no such file or directory.

onedrive-uploader version:0.50
system: Debian arm 5.15

ddddd

@poweryu In version 0.5.1, OneDrive Uploader uses the config.json from the current working directory. You can change that behaviour by specifying the path to your config.json using the "-c" parameter, i.e.:

onedrive-uploader -c /path/to/config.json <command>

Is it possible to fill in Secret and save it to the .config directory automatically, like github's cli gh, so that you don't need to specify the "-c" parameter to run it in other directories?

That's a good idea. I'll look into that.

Thank you!

@poweryu Version 0.6.0 which I just released stores the configuration file in the current user's config directory (i.e. .config on Linux).