netlify / cli

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

Undescriptive "Unlinked undefined from..." console log when unlinking site from a directory without a netlify.toml #6895

Closed benhancock closed 1 month ago

benhancock commented 1 month ago

Describe the bug

When running netlify unlink from a directory that does not have a netlify.toml config file, the command outputs Unlinked undefined from <sitename>. This console log should be more descriptive

Steps to reproduce

  1. Run netlify link from a repository that does not have a netlify.toml and link to a site
  2. Run netlify unlink
  3. The CLI outputs Unlinked undefined from <yoursitename>

Configuration

No response

Environment

System: OS: macOS 15.0 CPU: (8) arm64 Apple M2 Memory: 100.94 MB / 8.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 21.6.2 - ~/.nvm/versions/node/v21.6.2/bin/node Yarn: 1.22.21 - ~/.nvm/versions/node/v21.6.2/bin/yarn npm: 10.2.4 - ~/.nvm/versions/node/v21.6.2/bin/npm pnpm: 9.12.0 - ~/.nvm/versions/node/v21.6.2/bin/pnpm npmGlobalPackages: netlify-cli: 17.36.4