From 82ee20866c6e19e7a479a633db02c47d578fbb64 Mon Sep 17 00:00:00 2001 From: Mackinnon Buck <mackinnon.buck@gmail.com> Date: Thu, 9 Jun 2022 13:56:11 -0700 Subject: [PATCH] [release/6.0] Fix line endings for SPA proxy script on MacOS (#41821) * Fix line endings for SPA proxy script on MacOS * Update SpaProxyLaunchManager.cs --- src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs b/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs index 75d5edbc574..63c6fd1c222 100644 --- a/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs +++ b/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs @@ -251,7 +251,7 @@ catch { var fileName = Guid.NewGuid().ToString("N") + ".sh"; var scriptPath = Path.Combine(AppContext.BaseDirectory, fileName); - var stopScript = @$"function list_child_processes(){{ + var stopScript = @$"function list_child_processes () {{ local ppid=$1; local current_children=$(pgrep -P $ppid); local local_child; @@ -282,7 +282,7 @@ do done; rm {scriptPath}; "; - File.WriteAllText(scriptPath, stopScript); + File.WriteAllText(scriptPath, stopScript.ReplaceLineEndings()); var stopScriptInfo = new ProcessStartInfo("/bin/bash", scriptPath) { -- GitLab