File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed 
src/Cli/Microsoft.DotNet.Cli.Utils 
test/dotnet.Tests/CommandTests/Run Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -416,4 +416,17 @@ public static string GetDirectorySeparatorChar()
416416
417417        return  null ; 
418418    } 
419+ 
420+ #if NET 
421+     public  static string  ResolveDirectoryLinkTarget ( string  path ) 
422+     { 
423+         var  info  =  new  DirectoryInfo ( path ) ; 
424+         if  ( info . ResolveLinkTarget ( returnFinalTarget :  true )  is  {  }  linkTarget ) 
425+         { 
426+             return  linkTarget . FullName ; 
427+         } 
428+ 
429+         return  info . FullName ; 
430+     } 
431+ #endif
419432} 
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public static string GetMessage()
7878    /// Used when we need an out-of-tree base test directory to avoid having implicit build files 
7979    /// like Directory.Build.props in scope and negating the optimizations we want to test. 
8080    /// </summary> 
81-     private  static readonly  string  s_outOfTreeBaseDirectory  =  Path . Join ( Path . GetTempPath ( ) ,  "dotnetSdkTests" ) ; 
81+     private  static readonly  string  s_outOfTreeBaseDirectory  =  PathUtility . ResolveDirectoryLinkTarget ( Path . Join ( Path . GetTempPath ( ) ,  "dotnetSdkTests" ) ) ; 
8282
8383    private  static bool  HasCaseInsensitiveFileSystem 
8484    { 
@@ -1611,7 +1611,6 @@ Hello from {programName}
16111611                """  ) ; 
16121612
16131613        // Backup the artifacts directory. 
1614-         Directory . CreateDirectory ( Path . GetDirectoryName ( artifactsBackupDir ) ! ) ; 
16151614        Directory . Move ( artifactsDir ,  artifactsBackupDir ) ; 
16161615
16171616        // Build using MSBuild. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments