fix: detect name,value header in config.csv
Header detection was only checking for key,value but the actual CSV uses name,value as header row. Now both are detected and skipped. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
36fdf52780
commit
4dbc418aab
1 changed files with 3 additions and 1 deletions
|
|
@ -502,9 +502,11 @@ impl ConfigManager {
|
|||
return Ok(0);
|
||||
} else {
|
||||
let first_line = lines[0].trim().to_lowercase();
|
||||
// Skip if first line looks like a header (contains "key" or is just "key,value")
|
||||
// Skip if first line looks like a header
|
||||
if first_line == "key,value"
|
||||
|| first_line == "name,value"
|
||||
|| first_line.starts_with("key,")
|
||||
|| first_line.starts_with("name,")
|
||||
|| first_line.contains("header")
|
||||
{
|
||||
1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue