File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,16 @@ class ProjectCacheImpl {
5252  async  init ( ) : Promise < void >  { 
5353    const  indexPath  =  join ( this . projectScratchDir ,  "project-cache" ) ; 
5454    ensureDirSync ( indexPath ) ; 
55-     this . index  =  await  Deno . openKv ( indexPath ) ; 
56-     const  version  =  await  this . index . get ( [ "version" ] ) ; 
55+     this . index  =  await  Deno . openKv ( join ( indexPath ,   "deno-kv-file" ) ) ; 
56+     let  version  =  await  this . index . get ( [ "version" ] ) ; 
5757    if  ( version . value  ===  null )  { 
5858      await  this . createOnDisk ( ) ; 
59+       version  =  await  this . index . get ( [ "version" ] ) ; 
5960    } 
60-     assert ( typeof  version . value  ===  "number " ) ; 
61-     const  requiredVersion  =  requiredQuartoVersions [ version . value   as   number ] ; 
61+     assert ( typeof  version . value  ===  "string " ) ; 
62+     const  requiredVersion  =  requiredQuartoVersions [ version . value ] ; 
6263    if  ( 
63-       ! requiredVersion  ||  ! satisfies ( requiredVersion ,   quartoConfig . version ( ) ) 
64+       ! requiredVersion  ||  ! satisfies ( quartoConfig . version ( ) ,   requiredVersion ) 
6465    )  { 
6566      console . warn ( "Unknown project cache version." ) ; 
6667      console . warn ( 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments