[Bug?]: Changes to files with special characters in the name cause false positives in yarn workspaces list --since
#6804
Labels
bug
Something isn't working
Self-service
Describe the bug
When a changed file has certain special characters in the name,
yarn workspaces list --since
will claim the root workspace has changes rather than the actual affected workspace.When changed files contain certain special characters (e.g.
"
),git diff --name-only
includes quotes around file names. To my understanding this is the command Yarn uses under the hood for this command. It seems this could be avoided by either:git diff --name-only -z
to get results asNUL
-separated rather than newline-separated.To reproduce
I've attached a git repo bundled with
git bundle
:example.bundle.gz
gunzip example.bundle.gz && git clone example.bundle.gz && cd example
git checkout quoted && YARN_CHANGESET_BASE_REFS=master yarn workspaces list --recursive --since --json -v
. Note that it shows changes in the root workspace.git checkout unquoted && YARN_CHANGESET_BASE_REFS=master yarn workspaces list --recursive --since --json -v
. Note that it shows changes in thesample
workspace.In both cases, the only change is the addition of a new file in the
workspace
dir. In thequoted
branch that file's name contains a"
, whereas in theunquoted
branch it does not.Environment
System: OS: Linux 6.12 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (16) x64 AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics Binaries: Node: 20.19.2 - /tmp/xfs-d5277bfe/node Yarn: 4.9.1 - /tmp/xfs-d5277bfe/yarn npm: 10.8.2 - ~/.nvm/versions/node/v20.19.2/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: