laravel - What does -f (minus f) do in the Laravel Forge deploy script?
问题描述
Here's the code snippet:
if [ -f artisan ]
then
php artisan migrate --force
fi
What does the -f
do in the if statement? Is is asking whether the batch file was invoked with artisan as a parameter? Or perhaps checking to see that the artisan
file is found in the current directory? How exactly does it work?
解决方案
如果文件工匠存在,则继续进行迁移。
信用@the-alpha 谁写了这个作为评论
推荐阅读
- node.js - 使用 Strong-Soap 与 Node 进行简单的 SOAP 调用
- angular - 角度重定向后如何从数据库加载数据
- postgresql - Postgres JSONb更新(在Json数组内),当找不到匹配项或空参数时删除数组中的所有元素?
- node.js - 特快专递请求返回 404 状态
- python - 使用 Pandas 滚动差异
- swift - 快速从库中选择照片不起作用
- php - PHP fgets() 读取一行 CSV 时出错
- c++ - 使用函数显示结构数组的元素
- javascript - 绘制形状时设置 OpenLayers 3 光标样式
- xamarin.ios - 滑动删除动画在 IOS 11 中不起作用