Skip to content

dotenv parser shows wrong line number after inheritance syntax #649

@panzi

Description

@panzi

If the inheritance syntax is used the line number isn't incremented.

Meaning, if rune == '\n' here, then p.line needs to be incremented:

inherited = rune == '\n'

I'd add that before the successful return at the end of the function, so that if an error is reported it points at the correct line:

	if inherited {
		p.line++
	}
	return key, cutset, inherited, nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions