Level 6
It is testing if the "file" exists, i.e. run the commands only if file artisan is present.
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
What does the-f option in the first line on the Forge deployment script mean?
if [ -f artisan ]
then
php artisan migrate --force
fi
It is testing if the "file" exists, i.e. run the commands only if file artisan is present.
Please or to participate in this conversation.