I'm running Ubuntu on WSL2 and VSCode on top of that. Although I have the "LF" setting on VSCode, whenever I save the file, VSCode insists on inserting a carriage return that gets marked as ^M
with git diff
. Check it out:
diff --git a/network/outputs.tf b/network/outputs.tf
index e13366b..f7cc29c 100644
--- a/network/outputs.tf
+++ b/network/outputs.tf
@@ -1,4 +1,4 @@
-output "vpc_id" {
- description = "The ID of the Main VPC"
- value = aws_vpc.main.id
+output "vpc_id" {^M
+ description = "The ID of the Main VPC"^M
+ value = aws_vpc.main.id^M
}
I have no problem with this on VIM.