File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,9 @@ pub fn append_file(dest: &Path, line: &str) -> io::Result<()> {
134134pub fn symlink_dir ( src : & Path , dest : & Path ) -> io:: Result < ( ) > {
135135 #[ cfg( windows) ]
136136 fn symlink_dir_inner ( src : & Path , dest : & Path ) -> io:: Result < ( ) > {
137- // std's symlink uses Windows's symlink function, which requires
138- // admin. We can create directory junctions the hard way without
139- // though.
140- symlink_junction_inner ( src, dest)
137+ // On Windows creating symlinks isn't allowed by default so if it fails
138+ // we fallback to creating a directory junction.
139+ std:: os:: windows:: fs:: symlink_dir ( src, dest) . or_else ( |_| symlink_junction_inner ( src, dest) )
141140 }
142141 #[ cfg( not( windows) ) ]
143142 fn symlink_dir_inner ( src : & Path , dest : & Path ) -> io:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments