From 6aa1582ed1b589f33aa9a8f8360bf869bf92c02b Mon Sep 17 00:00:00 2001 From: Pedro Dias Date: Tue, 8 Dec 2015 11:35:22 +0000 Subject: [PATCH] fixing https://github.com/apocas/dockerode/issues/199 --- lib/docker.js | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/docker.js b/lib/docker.js index 656bf2c..e0ad2fe 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -475,7 +475,10 @@ Docker.prototype.pull = function(repoTag, opts, callback, auth) { args.opts.fromImage = imageSrc.repository; args.opts.tag = imageSrc.tag; - var argsf = [auth, args.opts, args.callback]; + var argsf = [args.opts, args.callback]; + if(auth) { + argsf = [auth, args.opts, args.callback]; + } return this.createImage.apply(this, argsf); }; diff --git a/package.json b/package.json index bf0d2fa..9f19636 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dockerode", "description": "Docker Remote API module.", - "version": "2.2.6", + "version": "2.2.7", "author": "Pedro Dias ", "maintainers": [ "apocas "