From f59071ff1c2da7f03cd58b626f2267ab14905352 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Fri, 28 Jan 2022 17:23:01 +0000 Subject: [PATCH 1/2] Trim whitespace from privateKey before parsing --- app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index b9d570c5..3ba384b9 100644 --- a/app.go +++ b/app.go @@ -724,7 +724,8 @@ func readOrCreatePrivateKey(path string) (*key.MachinePrivate, error) { return nil, fmt.Errorf("failed to read private key file: %w", err) } - privateKeyEnsurePrefix := PrivateKeyEnsurePrefix(string(privateKey)) + trimmedPrivateKey := strings.TrimSpace(string(privateKey)) + privateKeyEnsurePrefix := PrivateKeyEnsurePrefix(trimmedPrivateKey) var machineKey key.MachinePrivate if err = machineKey.UnmarshalText([]byte(privateKeyEnsurePrefix)); err != nil { From ab45cd37f8cf9203fcc6c14865d0e33271036ac9 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Fri, 28 Jan 2022 17:40:39 +0000 Subject: [PATCH 2/2] Only golint new problems --- .github/workflows/lint.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b3c64006..6fb985f7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,12 @@ jobs: with: version: latest + # Only block PRs on new problems. + # If this is not enabled, we will end up having PRs + # blocked because new linters has appared and other + # parts of the code is affected. + only-new-issues: true + prettier-lint: runs-on: ubuntu-latest steps: