Skip to content

Commit

Permalink
this will also begin to set things right
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Jul 30, 2024
1 parent eae734b commit 638ed28
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tasks/ssh.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ module.exports = (lando, app) => ({
return app.init().then(() => {
// get the service api if possible
const api = _.get(_.find(app.info, {service}), 'api', 3);
// and whether it can exec
const canExec = api === 4 && _.get(_.find(app?.v4?.services, {id: service}), 'canExec', false);

// set additional opt defaults if possible
const opts = [undefined, api === 4 ? undefined : '/app'];
// mix any v4 service info on top of app.config.services
Expand All @@ -59,13 +56,6 @@ module.exports = (lando, app) => ({
if (!config.appMount && _.has(config, 'config.working_dir')) opts[0] = config.config.working_dir;
}

// if this is an api 4 service that canExec then we have special handling
if (api === 4 && canExec) {
if (command === bashme) command = 'bash';
if (typeof command === 'string') command = require('string-argv')(command);
command = ['/etc/lando/exec.sh', ...command];
}

// continue
if (_.isNull(user)) user = require('../utils/get-user')(service, app.info);
return lando.engine.run(require('../utils/build-tooling-runner')(
Expand Down

0 comments on commit 638ed28

Please sign in to comment.