feat(analysis): add overwrite protection

This commit is contained in:
2022-12-12 21:38:57 -05:00
parent 7f9621b4f6
commit 29d8ec640f
+12
View File
@@ -63,6 +63,18 @@ if [ ! -e "$OLD_OPTIONS_FLUTTER" ]; then
exit 1
fi
if [ -e "$NEW_OPTIONS" ]; then
echo "analysis_options.${new}.yaml already exists"
echo "${usage}"
exit 1
fi
if [ -e "$NEW_OPTIONS_FLUTTER" ]; then
echo "analysis_options.flutter.${old}.yaml already exists"
echo "${usage}"
exit 1
fi
# Copy previous version files
cp "${OLD_OPTIONS}" "${NEW_OPTIONS}"
cp "${OLD_OPTIONS_FLUTTER}" "${NEW_OPTIONS_FLUTTER}"