Closed richarduncle closed 5 years ago
确认一下 /Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/src/zh-CN
与 /Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/json/zh-CN.json
是否存在
手动cp出来和命令发布出来一样吗? 要不我直接复制出来好了?
@richarduncle 你在这行下面:https://github.com/overtrue/laravel-lang/blob/master/src/Commands/Publish.php#L108
加一个:
$process->getCommandLine(); 并且打印一下结果看看
@richarduncle 肯定是在 $process 定义后调用。。。108行删掉。。。
php artisan lang:publish zh-CN
结果
"'cp' '-rn' '/Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/src/zh-CN /Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/json/zh-CN.json' '/Applications/MAMP/htdocs/rarone_watch/resources/lang/'"
OK 我明白了
107 - 109 改为:
$files = implode(' ', \array_map('escapeshellarg', $files));
$targetPath = escapeshellarg($targetPath);
$process = Process::fromShellCommandline("cp -r{$force} {$files} {$targetPath}");
chenjinhaodeMacBook-Pro:rarone_watch chenjinhao$ php artisan lang:publish zh-CN
In Publish.php line 109:
Call to undefined method Symfony\Component\Process\Process::fromShellCommandline()
composer update symfony/process
3.0.14版,107-109改成如上后,报错如图。
@ChenRuihua No space left... 磁盘满了兄弟
并没有。
@overtrue 老眼昏花看串行了。确实满了。老大。见笑了。看错成disk0s2了。原来项目在disk0s1上呀。晕倒。
chenjinhaodeMacBook-Pro:rarone_watch chenjinhao$ php artisan lang:publish zh-CN
cp: /Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/src/zh-CN /Applications/MAMP/htdocs/rarone_watch/vendor/caouecs/laravel-lang/json/zh-CN.json: No such file or directory
published languages (no overwrite): ["zh-CN"].