<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div>I am also having this bug:</div><div><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879555">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879555</a></div><div><br></div><div></div><div></div><div><div>$ parted -v</div><div>parted (GNU parted) 3.6</div><div>Copyright (C) 2023 Free Software Foundation, Inc.</div><div>License GPLv3+</div><div>Written by <<a href="http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS">http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS</a>>.</div></div><div><br></div><div>$ <span style="font-family: monospace;">cat /etc/lsb-release </span></div><div><div><span style="font-family:monospace">DISTRIB_ID="ManjaroLinux"
<br>DISTRIB_RELEASE="24.0.2"
<br>DISTRIB_CODENAME="Wynsdey"<br></span></div></div><div><br></div><div>-- If increasing the size of a partition the following command works but if reducing the size of a partition it gives a warning "Warning: Shrinking a partition can cause data loss, are you sure you want to continue?" and the command just exits back to the command prompt and no changes are made to the partition.</div><div><br></div><div>sudo parted -s /dev/loop0 resizepart 1 46280703s</div><div><br></div><div><div>I assumed that parted -s would automatically supply a default value of 'Yes' in this instance?</div></div><div><br></div><div>According to the Parted Man page:</div><div>-s, --script</div><div>never prompts for user intervention</div><div><br></div><div>Is this a bug or am I misunderstanding something?</div><div><br></div><div>From researching the interweb this might be a bug that for many years has never been addressed.</div><div><br></div><div>There appears to be no way to make this work with parted -s. The only option is to resort to the undocumented ---pretend-input-tty <-- But is this safe to keep using if not documented? Any plans to make it an official "thing" in Parted?</div><div><br></div><div>Example that will work whether increasing or reducing the partition size:</div><div><br></div><div>echo -e "resizepart 1 46280703s\nyes\nunit s\nprint\nquit" | sudo parted /dev/loop0 ---pretend-input-tty</div><div><br></div><div>Any help much appreciated,</div><div><br></div><div>Flex</div><div><span></span></div></body></html>