Subject: bug#42495: closed (Re: bug#42495: Option not working in scripting mode.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 Jul 2020 22:53:02 +0000

Your bug report

#42495: Option not working in scripting mode.

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42495
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#42495: Option not working in scripting mode.
From: "Brian C. Lane" <[email-masked]>
To: [email-masked]
Date: Thu, 23 Jul 2020 15:52:17 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On Thu, Jul 23, 2020 at 06:14:35PM +0000, Sachiel2008 via Bug reports for the GNU Parted disk partition editor wrote:
> Seems like I accidentally deleted the last sentence. When I try the second chunk of commands, I get a invalid option error.
> 
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, July 23, 2020 6:13 PM, Sachiel2008 <[email-masked]> wrote:
> 
> > Dear GNU
> >
> > I found the following command op the internet:
> >
> >> root@localhost # parted -a optimal /dev/sda
> >> (parted) unit mib
> >> (parted) mkpart primary 515 -1
> >
> > However, when I try to turn it into a part of a script like this:
> >
> >> root@localhost # parted --script /dev/sda mkpart primary 515 -1

You need to pass -- so that the argument parser won't try to turn -1
into an option:

 parted --script -- /dev/sda mkpart primary 515 -1

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart

Subject: Re: Option not working in scripting mode.
From: Sachiel2008 <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 23 Jul 2020 18:14:35 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Seems like I accidentally deleted the last sentence. When I try the second chunk of commands, I get a invalid option error.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, July 23, 2020 6:13 PM, Sachiel2008 <[email-masked]> wrote:

> Dear GNU
>
> I found the following command op the internet:
>
>> root@localhost # parted -a optimal /dev/sda
>> (parted) unit mib
>> (parted) mkpart primary 515 -1
>
> However, when I try to turn it into a part of a script like this:
>
>> root@localhost # parted --script /dev/sda mkpart primary 515 -1
>
> Greetings, Sachiel2008