--- a/parted/parted.c 2014-06-15 15:16:33.000000000 -0400 +++ b/parted/parted.c 2017-05-24 17:27:02.093371079 -0400 @@ -1551,7 +1551,7 @@ do_resizepart (PedDevice** dev, PedDisk* start, end)) goto error_destroy_constraint; /* warn when shrinking partition - might lose data */ - if (part->geom.end < oldend) + if (part->geom.end < oldend && !opt_script_mode) if (ped_exception_throw ( PED_EXCEPTION_WARNING, PED_EXCEPTION_YES_NO,