From 660724a937096a238c89da8cfdb2850fbaca70a7 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:12:33 -0800 Subject: [PATCH] Normalize line endings in launchsettings file (#5177) Fixes https://github.com/microsoft/typespec/issues/4340 --- packages/http-client-csharp/eng/scripts/Generate.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index f26ea9f945..6dd27b46fc 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -162,5 +162,6 @@ if ($null -eq $filter) { # Write the launch settings to the launchSettings.json file $launchSettingsPath = Join-Path $solutionDir "Microsoft.Generator.CSharp" "src" "Properties" "launchSettings.json" - $sortedLaunchSettings | ConvertTo-Json | Set-Content $launchSettingsPath + # Write the settings to JSON and normalize line endings to Unix style (LF) + $sortedLaunchSettings | ConvertTo-Json | ForEach-Object { $_ -replace "`r`n", "`n" } | Set-Content $launchSettingsPath }