Skip to content

Commit 5a03005

Browse files
committed
Normalize line endings in embedded shell scripts before deploying (#586)
Windows MSI builds embed .sh files with CRLF line endings, which would break when deployed to the gateway. Normalize to LF in ReadEmbeddedResource so all deploy paths get Unix line endings automatically.
1 parent 2cdaa17 commit 5a03005

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/NetworkOptimizer.Web/Services/PerfTweaksDeploymentService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ public async Task SetManuallyDeployedAsync(string tweakId, bool isManual)
676676
if (stream == null) return null;
677677

678678
using var reader = new StreamReader(stream);
679-
return reader.ReadToEnd();
679+
return reader.ReadToEnd().Replace("\r\n", "\n");
680680
}
681681

682682
private static byte[]? ReadEmbeddedResourceBytes(string fileName)

0 commit comments

Comments
 (0)