Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lasse's avatar
Level 9

What is the -f option in the forge deployment script?

What does the-f option in the first line on the Forge deployment script mean?

if [ -f artisan ]
then
    php artisan migrate --force
fi
0 likes
2 replies
tyn's avatar
tyn
Best Answer
Level 6

It is testing if the "file" exists, i.e. run the commands only if file artisan is present.

1 like
lasse's avatar
Level 9

Ahh, of course. Thank you!

Please or to participate in this conversation.