Closed kumarabhirup closed 5 years ago
Yeah, just figured out that the setSetting()
function works best only when the value is more than 10 characters. If not, it updates the JSON file wildly.
If the value for a setSetting()
is never provided, the same bug occurs again without even throwing us any sort of error.
This is an EPIC BUG.
UPDATE: This bug is seen when you run setSetting()
for more than one time synchronously.
I'll try to make it asynchronous. In the meanwhile, I think this bug should let exist till it occurs in the deployment code and I may try my best to not run setSetting()
function simultaneously.
This issue should now be solved.
At the commit ef5f4e7,
The setSetting()
method returns a Promise. Due to that, the method can now only be called in an async function with an await
keyword before.
Look at the example,
var asyncFunction = aync () => {
await setSetting("lang", "en")
await setSetting("username", "Kumar Abhirup")
await setSetting("username", null)
}
👍 💯
Just run this once:
You will see your
.config/settings.json
JSON file go wild:See how that extra bracket breaks everything.
If you made your
settings
variable inBulkMailCli_settings
fromvar
toconst
, more absurd things are seen. Just like this:This needs to be fixed somehow in PR #2