diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index 2c06069f772ba6f824ad5ce99757d2056357e5ae..2a20acaf1e4573148c9a5733ac0b83393ab1d673 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -694,7 +694,7 @@ $invocation "\$@"
 # The VM exits with code 255 if the snapshot version is out-of-date.
 # If it is, we need to delete it and run "pub global" manually.
 exit_code=\$?
-if [[ \$exit_code != 255 ]]; then
+if [ \$exit_code != 255 ]; then
   exit \$exit_code
 fi