Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"api.qa.foo.redhat.com",
"api.stage.foo.redhat.com",
"api.prod.foo.redhat.com"
];
try {
await set("127.0.0.1", hostnames.join(" "));
console.log(
`Added ${c.fg.l.cyan}cp${c.end} hostnames to ${hostile.HOSTS}`
);
} catch (e) {
console.error(
`Unable to write ${
hostile.HOSTS
}. Either try again with sudo, or copy the following into your ${
hostile.HOSTS
} file.
`
);
console.error(`127.0.0.1 ${hostnames.join(" ")}`);
}
}