From 8055a51f904f9d9ee33b48d93b29a820e6ad83c5 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Fri, 22 May 2020 13:47:24 +0100 Subject: [PATCH 1/2] release: add required token to release workflow Add the required GITHUB_TOKEN token to the release workflow. --- .github/workflows/release-homebrew.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-homebrew.yaml b/.github/workflows/release-homebrew.yaml index 262cd673b..a57ebd831 100644 --- a/.github/workflows/release-homebrew.yaml +++ b/.github/workflows/release-homebrew.yaml @@ -11,6 +11,7 @@ jobs: uses: actions/github-script@0.3.0 id: version with: + github-token: ${{secrets.GITHUB_TOKEN}} result-encoding: string script: | const { data } = await github.repos.getReleaseByTag({ From ad2aa161ab05d87f0bb5cfba2c28d256df6a363b Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Fri, 22 May 2020 15:05:59 +0100 Subject: [PATCH 2/2] windows-ui: fix inverted user interactive check The code that was copied from the .NET runtime code (dotnet/runtime) had a bug in it that inverted the check for the WSF_VISIBLE flag! Updated the code to match their now fixed version. --- .../Interop/Windows/WindowsSessionManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/Microsoft.Git.CredentialManager/Interop/Windows/WindowsSessionManager.cs b/src/shared/Microsoft.Git.CredentialManager/Interop/Windows/WindowsSessionManager.cs index ace31c59d..decba80b7 100644 --- a/src/shared/Microsoft.Git.CredentialManager/Interop/Windows/WindowsSessionManager.cs +++ b/src/shared/Microsoft.Git.CredentialManager/Interop/Windows/WindowsSessionManager.cs @@ -20,7 +20,7 @@ public unsafe bool IsDesktopSession // In .NET 5 the implementation on Windows has been 'fixed', but still POSIX versions always return true. // // This code is lifted from the .NET 5 targeting dotnet/runtime implementation for Windows: - // https://github.com/dotnet/runtime/blob/8c10a98c13263eea806d4fcecb76d29e38593539/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs#L125-L145 + // https://github.com/dotnet/runtime/blob/cf654f08fb0078a96a4e414a0d2eab5e6c069387/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs#L125-L145 // Per documentation of GetProcessWindowStation, this handle should not be closed IntPtr handle = User32.GetProcessWindowStation(); @@ -31,7 +31,7 @@ public unsafe bool IsDesktopSession if (User32.GetUserObjectInformation(handle, User32.UOI_FLAGS, &flags, (uint) sizeof(USEROBJECTFLAGS), ref dummy)) { - return (flags.dwFlags & User32.WSF_VISIBLE) == 0; + return (flags.dwFlags & User32.WSF_VISIBLE) != 0; } }