From ff560c6fef19fe81057e15ea0bc2f82365cb0c50 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Fri, 5 Apr 2024 15:25:08 +0200 Subject: [PATCH] Simplified the reading of MacOS config file --- ReleaseBuilder/Configuration.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ReleaseBuilder/Configuration.cs b/ReleaseBuilder/Configuration.cs index bd1c3487c..a7ffff1a7 100644 --- a/ReleaseBuilder/Configuration.cs +++ b/ReleaseBuilder/Configuration.cs @@ -177,8 +177,9 @@ public record ConfigFiles( if (File.Exists(gatekeeperSettingsFile)) { var kvp = File.ReadAllLines(gatekeeperSettingsFile) - .Where(x => !string.IsNullOrWhiteSpace(x) && x.StartsWith("export ")) - .Select(x => x.Substring("export ".Length).Trim().Split("=", 2)) + .Where(x => !string.IsNullOrWhiteSpace(x) && x.IndexOf('=') > 0) + .Select(x => x.StartsWith("export ") ? x.Substring("export ".Length).Trim() : x) + .Select(x => x.Trim().Split("=", 2)) .Where(x => x.Length == 2) .Select(x => new { Key = x[0], Value = x[1] }); @@ -194,7 +195,7 @@ public record ConfigFiles( ExpandEnv("GITHUB_TOKEN_FILE", "${HOME}/.config/github-api-token"), ExpandEnv("DISCOURSE_TOKEN_FILE", "${HOME}/.config/discourse-api-token"), ExpandEnv("CODESIGN_IDENTITY", ""), - ExpandEnv("NOTARIZE_PROFILE", "") + ExpandEnv("NOTARIZE_PROFILE", "duplicati-notarize") ); } }