File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1+ --- 
2+ " algohub " patch:fix 
3+ --- 
4+ 
5+ Fix git ssh key read and write permission issue when publishing to AUR.
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ components.d.ts
2828
2929#  Tailwind CSS
3030tailwind.css 
31+ 
32+ #  Autogenerated files
33+ .aur_ssh_key 
Original file line number Diff line number Diff line change @@ -68,20 +68,18 @@ const releaseAur = defineCommand({
6868      return ; 
6969    } 
7070
71-     writeFileSync ( `${ process . env . HOME }  ,  AUR_SSH_KEY  +  "\n" ) ; 
72-     execSync ( "chmod 600 ~/.ssh/aur" ) ; 
73-     execSync ( `git -C aur config core.sshCommand "ssh -i ~/.ssh/aur"` ) ; 
74- 
71+     writeFileSync ( `.aur_ssh_key` ,  AUR_SSH_KEY  +  "\n" ) ; 
72+     execSync ( `chmod 400 .aur_ssh_key` ) 
7573    if  ( ! existsSync ( "aur" ) )  { 
7674      execSync ( 
77-         `git -c init.defaultBranch=master -c core.sshCommand="ssh -i ~/.ssh/aur " clone ssh://aur@aur.archlinux.org/algohub.git aur` 
75+         `git -c init.defaultBranch=master -c core.sshCommand="ssh -i ../.aur_ssh_key " clone ssh://aur@aur.archlinux.org/algohub.git aur` 
7876      ) ; 
7977    } 
78+     execSync ( `git -C aur config core.sshCommand "ssh -i ../.aur_ssh_key"` ) ; 
8079
8180    const  {  version }  =  ctx . args ; 
8281
8382    const  url  =  `https://github.com/swpu-acm/algohub/releases/download/algohub-v${ version } ${ version }  ; 
84-     // const url = `https://github.com/swpu-acm/algohub/releases/download/algohub-v${version}/algohub_0.1.0_amd64.deb`; 
8583    try  { 
8684      console . log ( `Downloading ${ url }  ) ; 
8785      const  response  =  await  axios . get ( url ,  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments