Closed dannynimmo closed 1 month ago
Hello @dannynimmo
Thank you for the PR. This would imply that the constructor of one of your other console commands is calling "setAreaCode" which is conflicting with this bit of code.
I'm happy to merge this, however before I do that I need to verify that this code is still functioning properly
Seeing as I cannot replicate the issue with your Instance could you please put a breakpoint at the above line, and verify that the $paths variable is not empty? It needs to have correctly initialised as adminhtml to be functional which should be sufficient with the app emulation call, but good to check.
Thanks
Hey @convenient that's good insight, thanks for that. I will dig into our commands to track that down.
FWIW I've checked and confirmed $paths
is all good:
Thanks for testing @dannynimmo that looks sensible to me.
You may also be interested in this module https://github.com/run-as-root/magento-cli-auto-proxy, I have not tested it, but it aims to make all the console commands inject their dependencies as proxy. Which may help in your situation but i'm not sure.
I am getting "Area code is already set" on my installation. This fix catches the exception and allows the process to continue on.