From 9b524781d368518ca0882a3a6f6b0f6705d00eaf Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Mon, 18 Nov 2024 08:12:06 +1100 Subject: [PATCH] Follow-ups --- .github/workflows/go.yml | 2 +- CHANGELOG.md | 4 ++++ backend/sftp/options.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 775ccc54..066c32c5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: go-version: [1.22, 1.23] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Install Go diff --git a/CHANGELOG.md b/CHANGELOG.md index e86486e9..096ee992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Windows support in the os backend. +### Fixed +- Ability to run all unit tests on Windows. ## [6.22.0] - 2024-11-06 ### Fixed diff --git a/backend/sftp/options.go b/backend/sftp/options.go index 92249e17..a42e0e2e 100644 --- a/backend/sftp/options.go +++ b/backend/sftp/options.go @@ -5,7 +5,7 @@ import ( "fmt" "io" "os" - "path" + "path/filepath" "runtime" "strconv" @@ -231,7 +231,7 @@ func findHomeSystemKnownHosts(knownHostsFiles []string) ([]string, error) { if err != nil { return nil, err } - homeKnownHostsPath := path.Join(home, ".ssh/known_hosts") + homeKnownHostsPath := filepath.Join(home, ".ssh", "known_hosts") if runtime.GOOS != "windows" { homeKnownHostsPath = utils.EnsureLeadingSlash(homeKnownHostsPath) }