Open The-Michael-R opened 3 years ago
@The-Michael-R thanks for this - what does the error look like? I love the idea of a user friendly recovery for this, if you fancy doing a PR? :)
@matryer In my case the vars-file looked like:
{
"VAR_IP": "127.0.0.1",
"VAR_MAC": "42:42:42:42:42:42",
}
please note the "," after the VAR_MAC address. Now going to xbar->Open Plugin... it looks like that: (eventually a refresh is required). And of course the plugin stopped to work. Xbar still looks like it's working, but no action happens: Any notice that there's something wrong would be helpful. Even is that's just a warning sign.
About the PR: I would be happy to provide some code but that would be my first hands on to Go (I'm more a plain C coder) and alone figure out where to start might take some time.
@The-Michael-R That's a great report, thank you. I'll have a look at this. I suspect there may even be a JavaScript element to solving this one too; essentially, errors shouldn't crash things.
Hi, I managed to create an invalid vars file (removing obsolete variables, forgot to remove the comma at the last variable). I got an error message in the "Open Plugin..." screen complaining about the error.
An option to 'Fix' the *.vars.json file by create a clean new file would be helpful to get a user friendly recovery. Of course with a reasonable warning that this will reset the variables. The option to to manually edit the file would be nice too.
Probably a warning or message about the invalid vars file in the xbar-menu line would be nice too. Currently it just don't work as expected.
And: Thanks for the great tool!