This repository was archived by the owner on Jul 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -6720,12 +6720,28 @@ const tc = __nccwpck_require__(7784);
6720
6720
}
6721
6721
} ) ( ) ;
6722
6722
6723
- const url = `https://github.com/koki-develop/qiita-cli/releases/download/${ version } /qiita_${ platform } _${ arch } .tar.gz` ;
6723
+ const ext = ( ( ) => {
6724
+ switch ( platform ) {
6725
+ case "Windows" :
6726
+ return "zip" ;
6727
+ default :
6728
+ return "tar.gz" ;
6729
+ }
6730
+ } ) ( ) ;
6731
+
6732
+ const url = `https://github.com/koki-develop/qiita-cli/releases/download/${ version } /qiita_${ platform } _${ arch } .${ ext } ` ;
6724
6733
core . info ( `Downloading... ${ url } ` ) ;
6725
6734
const cliPath = await tc . downloadTool ( url ) ;
6726
6735
6727
6736
core . info ( "Installing..." ) ;
6728
- const extractedPath = await tc . extractTar ( cliPath ) ;
6737
+ const extractedPath = await ( async ( ) => {
6738
+ switch ( ext ) {
6739
+ case "zip" :
6740
+ return tc . extractZip ( cliPath ) ;
6741
+ case "tar.gz" :
6742
+ return tc . extractTar ( cliPath ) ;
6743
+ }
6744
+ } ) ( ) ;
6729
6745
const binPath = await tc . cacheDir ( extractedPath , "qiita" , "0.1.0" ) ;
6730
6746
core . addPath ( binPath ) ;
6731
6747
core . info ( "Installed." ) ;
You can’t perform that action at this time.
0 commit comments