首页 > 解决方案 > 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?

标签: laravelsh

解决方案


如果文件工匠存在,则继续进行迁移。

信用@the-alpha 谁写了这个作为评论


推荐阅读