Aller au contenu
A small, pixelated computer screen displays a prominent red stop button, next to a simple script document marked with a cancel X, and an empty file tray, all rendered in flat 8-bit style with just five distinct colors, no people, no background, and no visible text. The composition gives a clean, symbolic sense of halted tasks and inactivity.

Annuler

AI generated translation.

Il n’est pas rare que lors de l’exécution d’un script, vous souhaitiez annuler son exécution. Cela peut être fait en utilisant la fonction cancel. La fonction cancel prend un argument optionnel reason et arrêtera immédiatement l’exécution du script.

if (!env.files.length)
cancel("Nothing to do")