Open
Description
Describe the bug
I have a repo configured with the workspace root as an application, and packages inside of the same folder. This is not typical, but it is a supported structure according to the the NPM documentation.
The main application is built from the workspace root, and deploys perfectly fine in production however, running netlify build
from the workspace root will only ever show the prompt to select a workspace package.
Previous to this PR, it was possible to set the --cwd
flag and override this behavior.
Steps to reproduce
- create a monorepo with a
build
script in the workspace package.json - create a new package inside the workspace packages folder and add the folder to the root package.json
workspaces
key - run
npx [email protected] build --cwd .
build runs successfully - run
npx [email protected] build --cwd .
cli prompt for workspace package appears - This is breaking behavior
Configuration
No response
Environment
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Max
Memory: 66.64 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.15.0
npm: 10.9.2
npmPackages:
netlify-cli: ^22.1.6 => 22.2.1