twilio / twilio-cli

Unleash the power of Twilio from your command prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error trying to remove profile

dprothero opened this issue · comments

Issue Summary

Trying to remove a profile throws an error.

Steps to Reproduce

  1. Run twilio profiles:remove dprothero

Technical details:

  • twilio-cli version: 3.0.1
  • node version: 16.4.1
  • Command output with debug logging enabled (adding -l debug to the end of the command):
[DEBUG] Config File: /Users/dprothero/.twilio-cli/config.json
[DEBUG] Using profile: ${TWILIO_ACCOUNT_SID}/${TWILIO_AUTH_TOKEN}
[DEBUG] Found command "profiles:remove" plugin: twilio-cli
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: "https://github.com/twilio/twilio-cli/issues"
[DEBUG] Cannot read property 'id' of undefined
[DEBUG] TypeError: Cannot read property 'id' of undefined
    at ProfilesRemove.removeProfileStatus (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/src/commands/profiles/remove.js:34:23)
    at ProfilesRemove.run (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/src/commands/profiles/remove.js:9:10)
    at async ProfilesRemove._run (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async Main._run (/Users/dprothero/.nvm/versions/node/v16.4.1/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:43:20)

Thanks for reaching out @dprothero!

Did some testing:

  • For profiles in keytar, profiles:remove works as expected.
  • For profiles in config (MVR release), profiles:remove works as expected too.

Update:

Screenshot 2022-02-01 at 1 58 34 AM

The error occurs when user has environment variables set, and tries to remove a profile.

I can confirm that I have environment variables set.