diff --git a/src/plugins/mongo/command-handlers.js b/src/plugins/mongo/command-handlers.js index 45c49a58..18f804d3 100644 --- a/src/plugins/mongo/command-handlers.js +++ b/src/plugins/mongo/command-handlers.js @@ -57,7 +57,7 @@ export function setup(api) { dest: '/opt/mongodb/mongo-start-new.sh', vars: { mongoVersion: mongoConfig.version, - mongoshCmd: mongoConfig.version.split(".")[0] > 5 ? "mongosh" : "mongo", + mongoshCmd: mongoConfig.version.split('.')[0] > 5 ? 'mongosh' : 'mongo', mongoDbDir: '/var/lib/mongodb' } }); @@ -117,7 +117,7 @@ export function shell(api) { const conn = new Client(); conn.on('ready', () => { - conn.exec(`docker exec -it mongodb ${config.mongo.version.split(".")[0] > 5 ? "mongosh" : "mongo" } ${dbName}`, { + conn.exec(`docker exec -it mongodb ${config.mongo.version.split('.')[0] > 5 ? 'mongosh' : 'mongo'} ${dbName}`, { pty: true }, (err, stream) => { if (err) { @@ -161,7 +161,7 @@ export async function status(api) { output: mongoStatus } = await api.runSSHCommand( server, - `docker exec mongodb ${config.mongo.version.split(".")[0] > 5 ? "mongosh" : "mongo" } --eval ${mongoCommand} --quiet` + `docker exec mongodb ${config.mongo.version.split('.')[0] > 5 ? 'mongosh' : 'mongo'} --eval ${mongoCommand} --quiet` ); try {