我在 WSL2 和 VSCode 上运行 Ubuntu。虽然我在 VSCode 上有“LF”设置,但每当我保存文件时,VSCode 坚持插入一个标记^M
为git diff
. 一探究竟:
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
}
我在 VIM 上对此没有任何问题。