Fix bug where destroying a stopped container would fail

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2015-08-11 18:09:11 -07:00
parent 0489c8a7ca
commit 2af6a595a9
1 changed files with 6 additions and 6 deletions

View File

@ -307,12 +307,12 @@ export default {
let container = this.client.getContainer(name);
container.unpause(function () {
container.kill(function (error) {
if (error) {
containerServerActions.error({name, error});
return;
}
container.remove(function () {
container.kill(function () {
container.remove(function (error) {
if (error) {
containerServerActions.error({name, error});
return;
}
containerServerActions.destroyed({id: name});
var volumePath = path.join(util.home(), 'Kitematic', name);
if (fs.existsSync(volumePath)) {