mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-24 12:35:32 +00:00
return promise for rm function
This commit is contained in:
parent
04a53032dc
commit
cb9da9ef14
2 changed files with 17 additions and 11 deletions
6
index.js
6
index.js
|
|
@ -128,18 +128,24 @@ const kill = function (options) {
|
||||||
* @param {cwd} options.cwd
|
* @param {cwd} options.cwd
|
||||||
*/
|
*/
|
||||||
const rm = function (options) {
|
const rm = function (options) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
const cwd = options.cwd;
|
const cwd = options.cwd;
|
||||||
|
|
||||||
exec('docker-compose rm', { cwd }).then(
|
exec('docker-compose rm', { cwd }).then(
|
||||||
standards => {
|
standards => {
|
||||||
if (options.log) {
|
if (options.log) {
|
||||||
logStandards(standards);
|
logStandards(standards);
|
||||||
|
|
||||||
|
return resolve();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
logger.error(err.message);
|
logger.error(err.message);
|
||||||
|
|
||||||
|
return reject(err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { up, kill, down, stop, rm };
|
module.exports = { up, kill, down, stop, rm };
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "docker-compose",
|
"name": "docker-compose",
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./node_modules/tape/bin/tape test",
|
"test": "./node_modules/tape/bin/tape test",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue