Autocompletion breaks when app .env can't be parsed #652
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If I have any unparseable statement in an
.envfile in my ~/abra/servers folder, autocompletion doesn't work at all for all the apps.WARNING:dotenv.main:Python-dotenv could not parse statement starting at line 130Example of such a statement:
APP_SERVICE_CONFIGS="["/signal-data/registration.yaml"]"My expectation is that autocompletion still works at least for all the other apps, if not even for the app with broken .env, too
decentral1se referenced this issue2024-12-27 21:49:24 +00:00
I took a look at this.
Due to the way the lookup code works for apps / app envs, this can't be avoided in some cases. E.g. if we need to see what an env var value is and the parsing breaks. However, I was able to change the code to avoid parsing when doing
<app>lookups, so that is more robust.I also added a way to debug autocompletion when it is breaking and actually get the errors. It's a bit of a hack but if you do
abra __complete app deploy foo[enter], then you'll get the autocomplete output or failure.