You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
499 B

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;
}
}