Browse Source

Write path.txt after extraction

Kevin Sawicki 8 years ago
parent
commit
d2df641b0d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      npm/install.js

+ 2 - 2
npm/install.js

@@ -47,9 +47,9 @@ download({
 // unzips and makes path.txt point at the correct executable
 function extractFile (err, zipPath) {
   if (err) return onerror(err)
-  fs.writeFile(path.join(__dirname, 'path.txt'), paths[platform], function (err) {
+  extract(zipPath, {dir: path.join(__dirname, 'dist')}, function (err) {
     if (err) return onerror(err)
-    extract(zipPath, {dir: path.join(__dirname, 'dist')}, function (err) {
+    fs.writeFile(path.join(__dirname, 'path.txt'), paths[platform], function (err) {
       if (err) return onerror(err)
     })
   })