diff --git a/index.js b/index.js index f728c51..c2afb49 100644 --- a/index.js +++ b/index.js @@ -128,18 +128,24 @@ const kill = function (options) { * @param {cwd} options.cwd */ const rm = function (options) { - const cwd = options.cwd; + return new Promise((resolve, reject) => { + const cwd = options.cwd; - exec('docker-compose rm', { cwd }).then( - standards => { - if (options.log) { - logStandards(standards); + exec('docker-compose rm', { cwd }).then( + standards => { + if (options.log) { + logStandards(standards); + + return resolve(); + } + }, + err => { + logger.error(err.message); + + return reject(err); } - }, - err => { - logger.error(err.message); - } - ); + ); + }); }; module.exports = { up, kill, down, stop, rm }; diff --git a/package.json b/package.json index 13ba716..941e393 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docker-compose", - "version": "0.3.1", + "version": "0.3.2", "main": "index.js", "scripts": { "test": "./node_modules/tape/bin/tape test",