Files
dingtalk-workspace-cli/internal/upgrade/skill_path_move_unix_test.go
玉澜 f14332f143 fix(skills): guard pruneSkillBackups against non-DWS directories
Restrict backup pruning to directories whose names match the DWS stamp
format (YYYYmmdd-HHMMSS with optional -N suffix) across all 8 installer
surfaces (Go, npm, 4 shell, 2 PowerShell). Unknown directories in
~/.dws/skill-backups are now preserved. Also fixes Windows coverage test
portability and covers the remaining macOS changed-code gap (retire
warning loop in runUpgrade).
2026-08-17 20:20:32 +08:00

17 lines
315 B
Go

//go:build !windows
package upgrade
import (
"os"
"syscall"
)
func testCrossDeviceError() error {
return &os.LinkError{Op: "rename", Old: "src", New: "dst", Err: syscall.EXDEV}
}
func testNoReplaceUnsupportedErrors() []error {
return []error{syscall.EINVAL, syscall.ENOSYS, errNoReplaceRenameUnsupported}
}