Skip to content

pmbootstrap init: Fix regexp for int

Administrator requested to merge extra_space/validate-int into master

Improves handling input in pmbootstrap init

Various config options in "Additional options" are int, thus whole input must be checked:

This fixes obvious error:

$ pmbootstrap init
Jobs [9]: 5e

and less obvious errors:

Extra space size: 600.5
Extra space size: 600m
...
$ pmbootstrap install
[17:28:23] *** (3/4) PREPARE INSTALL BLOCKDEVICE ***
[17:28:23] ERROR: invalid literal for int() with base 10: '600.5'

NOTE: I suppose moving ^ $ to ReadlineTabCompleter.ask() would break some of already defined regexes.

Edited by Administrator

Merge request reports

Loading