👋 Hi,
the documentation states that elektraPluginGet
should return 0
on success, yet the template suggests – since commit 📜 062e017e – that plugin functions should return 1
on success.
Other plugins also use 1
to show that functions were successful, as far as I can tell. The tcl
plugin on the other hand returns 0
on success. Which return value is the correct one?
both are correct
1 for success + keyset updated
0 for success but nothing changed
-1 for error
both are correct…
Thank you for the quick response. I will update the documentation accordingly.
I suggest to also add a note to the template, because it is trivial enough to not require to dive into a huge documentation:
// 1 for success + keyset updated
// 0 for success without changes
// -1 for error
return 1;
I suggest to also add a note to the template, because it is trivial enough to not require to dive into a huge documentation…
Good idea. I just added the information to elektraTemplateGet
in my local branch of the repo.
Most helpful comment
both are correct
1 for success + keyset updated
0 for success but nothing changed
-1 for error