30 lines
960 B
Diff
30 lines
960 B
Diff
|
From 3dc8b808bdc992fb72372ece84b45644bef2c206 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Kletzander <mkletzan@redhat.com>
|
||
|
Date: Mon, 24 Feb 2020 13:12:03 +0100
|
||
|
Subject: [PATCH] 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>
|
||
|
---
|
||
|
generator/customize.ml | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/generator/customize.ml b/generator/customize.ml
|
||
|
index c278347c1..0b256e2d2 100644
|
||
|
--- a/generator/customize.ml
|
||
|
+++ b/generator/customize.ml
|
||
|
@@ -873,6 +873,7 @@ let rec argspec () =
|
||
|
pr " ] 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.24.1
|
||
|
|