Closed g051051 closed 1 month ago
If you are using Dirigible, then you better ask Dirigible. Karavan Designer is supposed to be used in Karavan VS Code Extension of in Karavan Application.
The issue is with the line handling, because it's essentially hard-coded to assume "\n". Dirigible is just packaging the generated Karavan release as a bundle. This issue occurs regardless of whether Dirigible is involved or not, since it's related to a specific choice in the kamelet loader.
Describe the bug
I'm using Dirigible, which includes the Karavan Designer. When the project is checked out under Windows and built, the editor fails to start due to
YAMLException: expected a single document in the stream, but found more
. This was tracked into the code that loads thekamelets.yaml
file. It has an expression like this:n[0].split("\n---\n").map((function(e) {
This is attempting to split the YAML sub-documents and feed them into thesaveKamelets
function. However, if the files were checked out on Windows withcore.autocrlf
set to true, git will change the line ending to be Windows style CR/LF instead of LF. This breaks thesplit
call, the entire file is passed tosaveKamelets
, and the editor crashes with a blank error toast.Steps to reproduce the behavior
core.autocrlf
set to true.Variant
Web Application
Container Management (if applicable)
None
Operating System (if applicable)
Windows
Version
4.4.0
Relevant log output
No response