cakephp/cakephp — pull request #960 by tenebrousedge (2012-11-15 16:55:58+00:00)
Title: attempt at making --plugin param actually work.

I am not entirely sure that this is a correct solution.

Current behavior is: when --plugin param is given, individual methods in UpgradeShell will call App::pluginPath() to determine plugin paths. This in turn calls CakePlugin::pluginPaths, which seems not to have been initialized and is probably looking for correctly-named plugins anyway. In either case it returns empty no matter how the files are named.

I replaced the call to App::pluginPath with a call to $this->_pluginPaths() from the Shell class, which also checks CakePlugin, but then defaults to the legacy path when that returns nothing. This method does not actually check whether the files exist, although is_dir is called a couple times in the upgrade shell and will return an error if the directory /plugins/pluginname does not exist.

I'm not sure, due to unfamiliarity with the shell code, how the shell classes are actually supposed to be loading plugins.