netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.58k stars 352 forks source link

feature(command-status): add status:auth sub command #2040

Closed erezrokah closed 1 year ago

erezrokah commented 3 years ago

Describe the bug

This was introduced as a result of https://github.com/netlify/cli/pull/1999.

Prior to #1999 the code to fail if running outside a linked site was being ignored since we used to exit early if we didn’t find a netlify.toml.

To Reproduce

1. npm install -g netlify-cli 2. netlify login 3. netlify status from a directory not linked to a site 4. See that authentication information is printed, but then an error message to run netlify link is printed

Expected behavior

To be honest - not sure if this is a real bug as I could go either way. The confusion is because ntl status handles both authentication status and site information status

Perhaps we should have a status:auth subcommand

Update

Changing this to a feature request to be able to print authentication status outside a linked directory without failing

verythorough commented 3 years ago

Hm, yeah, that behavior feels pretty normal to me. I suppose there could be some value in having the status:auth command that only checks auth, but I'm not sure there's enough demand to justify the effort.

Perhaps we wait and see if we get any other requests for this?

erezrokah commented 3 years ago

Thanks @verythorough I updated the title and description

sarahetter commented 1 year ago

Closing as stale. Please re-open if needed