From 5e6353688f07a7681ec921fa9378da936cb61857 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 3 Oct 2024 12:12:47 +0200 Subject: [PATCH] feat: use the connection if it is passed as a parameter --- myt-run.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/myt-run.js b/myt-run.js index 5731aaf..bc16697 100755 --- a/myt-run.js +++ b/myt-run.js @@ -125,13 +125,14 @@ class Run extends Command { try { const server = new Server(ct, dbConfig); - if (isRandom) { + const useCustom = opts.ci || opts.network + if (isRandom || useCustom) { try { const netSettings = await ct.inspect({ format: '{{json .NetworkSettings}}' }); - if (opts.ci || opts.network) { + if (useCustom) { dbConfig.host = opts.network ? netSettings.Networks[opts.network].IPAddress : netSettings.Gateway; -- 2.40.1