Your IP : 216.73.216.40


Current Path : /var/www/html/wetty/src/server/cli/
Upload File :
Current File : /var/www/html/wetty/src/server/cli/index.ts

import * as yargs from 'yargs';
import { logger } from '../utils';
import WeTTy from '../wetty';
import { CLI } from './options';
import { unWrapArgs } from './parseArgs';

export default function init(opts: CLI): void {
  if (!opts.help) {
    const { ssh, server, command, forcessh, ssl } = unWrapArgs(opts);
    WeTTy(ssh, server, command, forcessh, ssl).catch(err => {
      logger.error(err);
      process.exitCode = 1;
    });
  } else {
    yargs.showHelp();
    process.exitCode = 0;
  }
}