-
-
Notifications
You must be signed in to change notification settings - Fork 772
Closed
Copy link
Description
Bug Report
When using talosctl edit machineconfig, newlines will be duplicated, if they use CLRF. The command creates the file with those line endings on windows.
To prevent duplicate newlines, I have to manually use "change end of line sequence" in VSCode everytime when using the command.
Reproduce:
Powershell on Windows
$env:TALOS_EDITOR = 'code -w' #wait for exit/closing vscode tab
talosctl edit machineconfig # specify -n as required
# The status line of the opened file should show CLRF
# Now close the vscode tab/window
talosctl edit machineconfig # check again
# Every newline is now duplicated compared to last time.
# Modify the file in any way (e.g. add a yaml comment)
# Convert to LF using the "change end of line sequence" in VSCode
# Make sure to save the file, then close the vscode tab/window
talosctl edit machineconfig
# This time the file should look like how it was saved last time.Some more notes:
- When running
talosctl edit machineconfigand then exiting the editor, talos will detect the file as having changed. - When running
talosctl edit machineconfigand only converting the line endings toLF, talos will detect the file as not having been changed.
I have not (yet) tested, if this affects talosctl apply-config
Environment
- Talosctl version: v1.12.1
- Platform (Client): Windows