Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = ({ cliPkg, cliPath, cliUsage }) => {
//-- Initialize
util.initCli(cliUsage);
//-- Don't you dare sudo me
if (cli.isRoot()) {
terminal.dontSudoMe();
//-- Initialize CLI
} else {
const cliBin = ` cli${chalk.yellow('@')}${cliPkg.version} ${cliPath}`;
const workflowBin = `workflow${chalk.yellow('@')}${env.workflowConfig.version} ${paths.workflow.root}`;
cli.tasksRouter(meow({
pkg: cliPkg, // eslint-disable-line unicorn/prevent-abbreviations
description: `${env.logo} ${env.workflowConfig.definition}`,
help: `${cli.fullUsage}\n${cliBin}\n${workflowBin}`
}));
}
};