diff --git a/myt-run.js b/myt-run.js index cd85ea2..5731aaf 100644 --- a/myt-run.js +++ b/myt-run.js @@ -20,7 +20,8 @@ class Run extends Command { ci: 'Workaround for continuous integration system', network: 'Docker network to attach container to', random: 'Whether to use a random container name and port', - tmpfs: 'Whether to use tmpfs mount for MySQL data' + tmpfs: 'Whether to use tmpfs mount for MySQL data', + keep: 'Keep container on failure' } }; @@ -29,12 +30,14 @@ class Run extends Command { ci: 'c', network: 'n', random: 'r', - tmpfs: 't' + tmpfs: 't', + keep: 'k' }, boolean: [ 'ci', 'random', - 'tmpfs' + 'tmpfs', + 'keep' ] }; @@ -208,7 +211,7 @@ class Run extends Command { return server; } catch (err) { try { - await ct.rm({force: true}); + if (!opts.keep) await ct.rm({force: true}); } catch (e) {} throw err; } diff --git a/package-lock.json b/package-lock.json index 8b9dead..aeef553 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@verdnatura/myt", - "version": "1.6.4", + "version": "1.6.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@verdnatura/myt", - "version": "1.6.4", + "version": "1.6.6", "license": "GPL-3.0", "dependencies": { "@sqltools/formatter": "^1.2.5", diff --git a/package.json b/package.json index 77b225c..6e5762a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@verdnatura/myt", - "version": "1.6.5", + "version": "1.6.6", "author": "Verdnatura Levante SL", "description": "MySQL version control", "license": "GPL-3.0",