mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
On Windows, os.Symlink requires Developer Mode or admin privileges. Extract symlink creation into platform-specific files: on non-Windows, behavior is unchanged (os.Symlink). On Windows, try os.Symlink first, then fall back to directory junctions (mklink /J) for dirs and file copy for files. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
203 B
Go
14 lines
203 B
Go
//go:build !windows
|
|
|
|
package execenv
|
|
|
|
import "os"
|
|
|
|
func createDirLink(src, dst string) error {
|
|
return os.Symlink(src, dst)
|
|
}
|
|
|
|
func createFileLink(src, dst string) error {
|
|
return os.Symlink(src, dst)
|
|
}
|