mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:10:44 +00:00
docs-i18n: skip symlink test when unsupported
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -261,6 +262,9 @@ func TestResolveFixturePathInDirRejectsSymlinkEscape(t *testing.T) {
|
||||
|
||||
linkPath := filepath.Join(fixtureDir, "outside-link.txt")
|
||||
if err := os.Symlink(outsidePath, linkPath); err != nil {
|
||||
if os.IsPermission(err) || runtime.GOOS == "windows" {
|
||||
t.Skipf("symlink creation unavailable in this test environment: %v", err)
|
||||
}
|
||||
t.Fatalf("Symlink(%q, %q): %v", outsidePath, linkPath, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user