kubectl-slice does not slice file which uses Windows style line endings
hollowdrutt opened this issue · 3 comments
What did you do?
- Ran the command
helm template .
in PowerShell terminal in VS Code on Windows - Copied the output to Notepad++
- Saved the text to
complete.yaml
- Ran the command
kubectl-slice.exe -f complete.yaml -o .
What did you expect to see?
Multiple files generated
What did you see instead?
One file generated
When pasting the output into Notepad++ and saving to file the line endings got normalized to <CR><LF>
causing kubectl-slice.exe to miss the lines with ---<CR><LF>
kubectl-slice/slice/execute.go
Line 132 in d36ccf8
Hey @hollowdrutt, thanks a lot for opening this issue.
It should be a simple fix, but would want to test it a bit thoroughly. Give me a couple of days to come up with a good change and it should be up the pipe!
Thanks a lot!
Apologies for the PR auto-close. It should be fixed now, I included a test to check this as well from a buffer perspective, which should play neatly. If you could try out the new version 1.2.1 that would be awesome!
Let me know!
@patrickdappollonio I have tested with 1.2.1, now it works perfectly, thanks for your quick response and fix!