astorm/pestle

Could not find base Magento directory

Closed this issue · 5 comments

when ever i run any magento generate comands
php ~/pestle.phar magento2:generate:command
it tells me it cannot find a magento base dir

json@WhiteSnake:/mnt/c/Users/jason/PhpstormProjects/js-mg$ php ~/pestle.phar magento2:generate:command
In which module? (Pulsestorm_Helloworld)]
Command Name? (Testbed)]
Could not find base Magento directory

Does a vanila magento need to be present in the same project root whenever i generate something

That's correct @IasonArgyrakis -- pestle needs to know what the base directory is in order to know where to create files, as well as (occasionally) where it can find certain Magento files from the core modules.

If we can ask -- what's your use case for wanting to run pestle outside of the root folder?

for my use I sftp to the server and mostly work on app/code direcotry so i dont need to have the whole vendor(directory) in my local directory

i think it is time i found a more eficient may...
Im still new to magento so some things are not yet obvious to me 😅😅

by core modules you are refering to the vendor/magento2 folder ?

Thank you for the prompt reply

by core modules you are refering to the vendor/magento2 folder ?

That's correct. Without these files there are some commands that don't work.

This use case points towards there being some value in a --skip-root-magento-check option (or something similar). If someone reading is up for implementing something like that I'd be open to merging it. I probably won't take that on myself as there are only so many hours in the day and this project's running mostly in standby mode these days.

before discorveing pestle i statred making something simlar using node.js (it is nothing fancy as im stiill learning)

if you wanna take a look at it you can find it here I would love to hear some feedback

Thank you for your assistance