Open ASDFGerte opened 2 years ago
This issue reproduces on master:
Error: expect(received).not.toContain(expected) // indexOf
Expected substring: not "to null"
Received string: "➤ YN0000: Successfully set npmScopes.myScope.npmAuthToken to null
"
at module.exports (evalmachine.<anonymous>:12:8)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:16)
at async executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
This issue reproduces on master:
Error: expect(received).not.toContain(expected) // indexOf
Expected substring: not "to null"
Received string: "➤ YN0000: Successfully set npmScopes.myScope.npmAuthToken to null
"
at module.exports (evalmachine.<anonymous>:12:8)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:16)
at async executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
I am seeing the same thing on a project I am working on. I ran: yarn config set -H npmScopes.myscope.npmAuthToken <mytoken>
and am getting: ➤ YN0000: Successfully set npmScopes.myscope.npmAuthToken
to null. This is only the case if I run it with the -H flag. If I do not it will correctly update my local .yarnrc.yml file. For reference, this is my yarn setup:
`nodeLinker: node-modules
npmScopes: myscope: npmAlwaysAuth: true npmRegistryServer: 'https://myinternal-npm-registry'
yarnPath: .yarn/releases/yarn-3.2.0.cjs`
@oliverdavidt, I figured out yarn config set -H npmScopes.myscope.npmAuthToken <mytoken>
will not work, somehow. You must use remove the -H
option since it will use the Home configurations instead of project configurations:
yarn config set 'npmScopes.myscope.npmAuthToken' '<mytoken>'
It worked
Self-service
Describe the bug
When using
yarn config set --home
, in the resulting "Successfully set ... to" message, the local config's value is used, if it exists. This is especially confusing, if the local value does exist, but isnull
, e.g. when the parent setting exists because of a sister setting.To reproduce
Expected:
Actual:
Environment
Additional context
No response