Make downloaded binary executable in intsall script

This commit is contained in:
Max Brunsfeld 2019-01-16 13:59:37 -08:00
parent 87c068faa9
commit 4689cadf9d
3 changed files with 6 additions and 2 deletions

View file

@ -51,6 +51,10 @@ get(assetURL, response => {
response.pipe(zlib.createGunzip()).pipe(file);
});
file.on('finish', () => {
fs.chmodSync(executableName, '755');
});
// Follow redirects.
function get(url, callback) {
https.get(url, response => {

View file

@ -1,5 +1,5 @@
{
"name": "tree-sitter-cli",
"version": "0.14.0-beta0",
"version": "0.14.0-beta1",
"lockfileVersion": 1
}

View file

@ -14,7 +14,7 @@
],
"main": "lib/api/index.js",
"scripts": {
"install": "install.js"
"install": "node install.js"
},
"bin": {
"tree-sitter": "tree-sitter"