我尝试使用Cakephp 3 upgrade tool。
我安装了作曲家,我做了这个:
cd /path/to/upgrade
bin/cake upgrade all /home/mark/Sites/my-app
然后我在windows命令shell中遇到了大量的错误。
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\a2d4223f62e3499a84b6ca30be24bfdb4cb6de40''
Update C:\mydir\myapp\lib\Cake\View\Helper\CacheHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\7fbe7651712387f351b1eb670b14c18e1161fcb8''
Update C:\mydir\myapp\lib\Cake\View\Helper\HtmlHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\2301f9bed1167ddb29ca4e06706d0d21bd015766''
Update C:\mydir\myapp\lib\Cake\View\Helper\NumberHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\e71af0cbc7df7ff76e801c5fb06ec07ee7f45233''
Update C:\mydir\myapp\lib\Cake\View\Helper\PaginatorHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\1b04b5a763ca4e798d1e176111e49008b7486724''
Update C:\mydir\myapp\lib\Cake\View\Helper\TextHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\f8ead667c131610c1f70f38d10c7122b34d9a7fc''
Update C:\mydir\myapp\lib\Cake\View\Helper\TimeHelper.php
error: Could not access ''C:\mydir\upgrade\tmp\upgrade\4a2c2e7f3f7e9faf744d10e6e1f3ff24bead7f08''
Update C:\mydir\myapp\lib\Cake\View\HelperCollection.php
我以管理员身份运行命令shell。会出现什么问题?当我在操作期间检查文件夹时,我可以看到文件夹中存在临时文件。
答案 0 :(得分:0)
我遇到了同样的问题。以下是对该问题的描述:
git diff --no-index 'T:\Logiciels\CakePHP_3_upgradeTool\tmp\upgrade\c5d0aaadb3484d4bfe56bdfc4553b444f6789e66' 'T:\Logiciels\CakePHP_3_upgradeTool\tmp\upgrade\4a6662f82cd03d46b515c28f7d77ef8a64c08cfd'
编辑(2015-07-12)
正如ndm所说,“问题的根源是git命令参数中的单引号用法,Windows CLI将传递它们,就好像它们属于文件路径”
我改变了这一行(第176行的/upgradeTool/src/Shell/Task/StageTask.php):
exec("git diff --no-index "$oPath" "$uPath"', $output);
到:
exec('git diff --no-index "'.$oPath.'" "'.$uPath.'"', $output);
现在这个过程似乎已经完成了。非常感谢!
答案 1 :(得分:0)
试用后,我找到了解决方案。正如DarXnake所说,问题是git。
当您安装git时,它会询问您是否要从命令行使用git。默认选项为Use Git Bash only
。我选择了那个选项。
现在我更新了git,当安装程序询问安装类型时,我选择了Run Git from the Windows Command Prompt
。然后我重试了cakephp升级,我没有得到任何访问错误。