Martin Kletzander
2020-Jan-29 14:25 UTC
[Libguestfs] [PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
The first split does not care about the whole string, it is just trying to get the command name in front, so triml is just right. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- mlcustomize/customize_cmdline.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/mlcustomize/customize_cmdline.ml b/mlcustomize/customize_cmdline.ml index c062379879e2..abd21a4cbca5 100644 --- a/mlcustomize/customize_cmdline.ml +++ b/mlcustomize/customize_cmdline.ml @@ -481,6 +481,7 @@ let rec argspec () ] in let lines = read_whole_file filename in let lines = String.lines_split lines in + let lines = List.map String.triml lines in let lines = List.filter ( fun line -> String.length line > 0 && line.[0] <> '#' -- 2.25.0
Possibly Parallel Threads
- Re: [PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
- Re: [PATCH v2] mlcustomize: Trim whitespaces from commands read from file (RHBZ#1351000)
- Re: [common PATCH] Trim whitespaces from commands read from file
- Re: [common PATCH] Trim whitespaces from commands read from file
- [common PATCH] Trim whitespaces from commands read from file