I'm creating a project that consists on calling 'bake project' (using DispatchShell
) from inside a task. The problem is, after I bake it, how do I get the app path to change from the current path to the newly baked one so I can automatically run other tasks inside it?
The code is the following:
public function execute(){
// ...
$this->dispatchShell(/* Bake project script */);
/* Where I want to change app path */
$this->dispatchShell(/* creating a schema */);
}
I have tried running $this->dispatchShell('-app appPath');
but it doesn't work.
You cannot call bake inside one app to bake code inside another in the manner you are trying to do it. You would probably need to call the shell from an exec() command or something similar.