async function setInstance (url: string, username: string, password: string, isDefault: boolean) {
const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ])
- if (settings.remotes.indexOf(url) === -1) {
+ if (settings.remotes.includes(url) === false) {
settings.remotes.push(url)
}
.description('set an existing entry as default')
.action(async url => {
const settings = await getSettings()
- const instanceExists = settings.remotes.indexOf(url) !== -1
+ const instanceExists = settings.remotes.includes(url)
if (instanceExists) {
settings.default = settings.remotes.indexOf(url)