From 5c75453aba669dc9bc8156b01f904497c45085ec Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 28 Aug 2018 16:07:36 +0100 Subject: [PATCH] version: fix test under Windows --- cmd/version/version_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/version/version_test.go b/cmd/version/version_test.go index 29b7d2a40..6e211e21a 100644 --- a/cmd/version/version_test.go +++ b/cmd/version/version_test.go @@ -4,6 +4,7 @@ import ( "fmt" "io/ioutil" "os" + "runtime" "testing" "github.com/ncw/rclone/cmd" @@ -21,7 +22,9 @@ func TestVersionWorksWithoutAccessibleConfigFile(t *testing.T) { assert.NoError(t, err) }() assert.NoError(t, tempFile.Close()) - assert.NoError(t, os.Chmod(path, 0000)) + if runtime.GOOS != "windows" { + assert.NoError(t, os.Chmod(path, 0000)) + } // re-wire oldOsStdout := os.Stdout oldConfigPath := config.ConfigPath