diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..39782d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:5.7.1-onbuild +MAINTAINER Owen Barton + +RUN apt-get update && \ + apt-get install -y graphicsmagick && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN npm link && \ + npm link webdrivercss + +CMD node diff --git a/lib/asyncCallback.js b/lib/asyncCallback.js index 2fb5d38..09b4fd7 100644 --- a/lib/asyncCallback.js +++ b/lib/asyncCallback.js @@ -5,7 +5,8 @@ */ var workflow = require('./workflow.js'), - endSession = require('./endSession.js'); + endSession = require('./endSession.js'), + fs = require('fs'); module.exports = function(err) { @@ -48,6 +49,9 @@ module.exports = function(err) { * finish command */ return endSession.call(this, function(err) { + if(that.currentArgs && !that.currentArgs.totalScreen){ + fs.unlinkSync(that.screenshot); + } that.self.takeScreenshot = undefined; that.cb(err, that.self.resultObject); that.self.resultObject = {};