File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const { runBinary } = require ( "binary-install" ) ;
3+ const { Binary } = require ( "binary-install" ) ;
44const os = require ( "os" ) ;
55const path = require ( "path" ) ;
66
@@ -46,7 +46,9 @@ function getBinaryPath() {
4646}
4747
4848try {
49- runBinary ( getBinaryPath ( ) , process . argv . slice ( 2 ) ) ;
49+ const binaryPath = getBinaryPath ( ) ;
50+ const binary = new Binary ( "tuido" , null , { installDirectory : path . dirname ( binaryPath ) } ) ;
51+ binary . run ( process . argv . slice ( 2 ) ) ;
5052} catch ( e ) {
5153 console . error ( "Error running tuido:" , e ) ;
5254 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change 1- const { install } = require ( "binary-install" ) ;
1+ const { Binary } = require ( "binary-install" ) ;
22const os = require ( "os" ) ;
33const { version } = require ( "./package.json" ) ;
44
@@ -64,7 +64,8 @@ function getBinary() {
6464try {
6565 const { url, name } = getBinary ( ) ;
6666 console . log ( `Downloading tuido binary from ${ url } ` ) ;
67- install ( url , name ) ;
67+ const binary = new Binary ( name , url ) ;
68+ binary . install ( ) ;
6869} catch ( e ) {
6970 console . error ( "Error installing tuido:" , e ) ;
7071 process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments