mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-21 21:38:58 +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
26
index.js
26
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 };
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue