fix(run): refs#6706 keep option to keep container on failure
This commit is contained in:
parent
26ac3e995a
commit
6eb451ecaf
11
myt-run.js
11
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;
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue