File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { exec } from 'child-process-promise';
22import { accessSync , chmodSync , constants , writeFileSync } from 'fs' ;
33import { platform } from 'os' ;
44import { resolve } from 'path' ;
5- import * as needle from 'needle' ;
65
76const clusterName = 'kind' ;
87
@@ -60,17 +59,9 @@ async function download(osDistro: string): Promise<void> {
6059 } catch ( error ) {
6160 console . log ( 'Downloading KinD...' ) ;
6261
63- const bodyData = null ;
64- // eslint-disable-next-line @typescript-eslint/camelcase
65- const requestOptions = { follow_max : 2 } ;
66- await needle ( 'get' ,
67- `https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-${ osDistro } -amd64` ,
68- bodyData ,
69- requestOptions ,
70- ) . then ( ( response ) => {
71- writeFileSync ( 'kind' , response . body ) ;
72- chmodSync ( 'kind' , 0o755 ) ; // rwxr-xr-x
73- } ) ;
62+ const url = `https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-${ osDistro } -amd64` ;
63+ await exec ( `curl -Lo ./kind ${ url } ` ) ;
64+ chmodSync ( 'kind' , 0o755 ) ; // rwxr-xr-x
7465
7566 console . log ( 'KinD downloaded!' ) ;
7667 }
You can’t perform that action at this time.
0 commit comments