diff --git a/build/package.json b/build/package.json index 422a48693..b81d226f5 100644 --- a/build/package.json +++ b/build/package.json @@ -8,7 +8,6 @@ "dependencies": { "async": "~0.2.9", "donna": "1.0.1", - "tello": "1.0.3", "formidable": "~1.0.14", "fs-plus": "2.x", "github-releases": "~0.2.0", @@ -35,6 +34,8 @@ "request": "~2.27.0", "rimraf": "~2.2.2", "runas": "~1.0.1", + "tello": "1.0.3", + "temp": "!0.8.1", "underscore-plus": "1.x", "unzip": "~0.1.9", "vm-compatibility-layer": "~0.1.0" diff --git a/build/tasks/install-task.coffee b/build/tasks/install-task.coffee index 13d349a50..650ac2372 100644 --- a/build/tasks/install-task.coffee +++ b/build/tasks/install-task.coffee @@ -3,6 +3,7 @@ path = require 'path' _ = require 'underscore-plus' fs = require 'fs-plus' runas = null +temp = require 'temp' module.exports = (grunt) -> {cp, mkdir, rm} = require('./task-helpers')(grunt) @@ -22,7 +23,11 @@ module.exports = (grunt) -> else if process.platform is 'darwin' rm installDir mkdir path.dirname(installDir) - cp shellAppDir, installDir + + tempFolder = temp.path() + mkdir tempFolder + cp shellAppDir, tempFolder + fs.renameSync(tempFolder, installDir) else binDir = path.join(installDir, 'bin') shareDir = path.join(installDir, 'share', 'atom')