From 1a56013808cddbd02971161c5c5a3dbab6c292d6 Mon Sep 17 00:00:00 2001 From: Matt Hoyle Date: Mon, 12 Oct 2015 07:33:53 +0100 Subject: [PATCH] make buffering example functional in new location --- examples/playbook.buffering.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/playbook.buffering.js b/examples/playbook.buffering.js index bf1af42..8ccfba4 100644 --- a/examples/playbook.buffering.js +++ b/examples/playbook.buffering.js @@ -3,8 +3,8 @@ var Path = require('path'); var Playbook = require("../index").Playbook; -var playbook_file = Path.join(__dirname, 'fixtures', 'buffering') -var inventory_file = Path.join(__dirname, 'fixtures', 'hosts') +var playbook_file = Path.join(__dirname, '..', 'test', 'fixtures', 'buffering') +var inventory_file = Path.join(__dirname, '..', 'test', 'fixtures', 'hosts') var command = new Playbook().playbook( playbook_file ); command.inventory( inventory_file ); @@ -20,9 +20,12 @@ commandb.on('stderr', function(data) { console.log("stderr buf: "+data.toString( promise.then(function(result){ console.log("unbuf: "+result.output); console.log("unbuf: "+result.code); + throw new Error('can you see me?'); return commandb.exec({buffered:true}); }).then(function(result){ console.log("buff: "+result.output); console.log("buff: "+result.code); -}); +})//.catch(function(error){ +// console.log("error!",error) +//})