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',
|
ci: 'Workaround for continuous integration system',
|
||||||
network: 'Docker network to attach container to',
|
network: 'Docker network to attach container to',
|
||||||
random: 'Whether to use a random container name and port',
|
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',
|
ci: 'c',
|
||||||
network: 'n',
|
network: 'n',
|
||||||
random: 'r',
|
random: 'r',
|
||||||
tmpfs: 't'
|
tmpfs: 't',
|
||||||
|
keep: 'k'
|
||||||
},
|
},
|
||||||
boolean: [
|
boolean: [
|
||||||
'ci',
|
'ci',
|
||||||
'random',
|
'random',
|
||||||
'tmpfs'
|
'tmpfs',
|
||||||
|
'keep'
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -208,7 +211,7 @@ class Run extends Command {
|
||||||
return server;
|
return server;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
try {
|
try {
|
||||||
await ct.rm({force: true});
|
if (!opts.keep) await ct.rm({force: true});
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.4",
|
"version": "1.6.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.4",
|
"version": "1.6.6",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sqltools/formatter": "^1.2.5",
|
"@sqltools/formatter": "^1.2.5",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.5",
|
"version": "1.6.6",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL version control",
|
"description": "MySQL version control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue