Describe the bug
According to the docs, preferInteractive: true should imply --interactive flag on every yarn add, but adding preferInteractive to yarnrc.yml has no effect.
To Reproduce
Reproduction
```js repro
await packageJson({ name: 'root', workspaces: ['packages/*'] })
await packageJson({ name: 'package-a', dependencies: { typescript: '3.8' } }, 'packages/package-a')
await expect(yarn('add', 'typescript', '--interactive', { timeout: 60000 })).rejects.toThrow(Command failed) // failed as expected because of interactive mode
require('fs').writeFileSync('.yarnrc.yml', 'preferInteractive: true')
await expect(yarn('add', 'typescript', { timeout: 60000 })).rejects.toThrow(Command failed) // it should also fail because of interactive mode, but succeeded as if there is no preferInteractive
```
Environment
Additional context
I cannot find any preferInteractive text in this repo other than docs.
We couldn't reproduce your issue (all the assertions passed on master).
We couldn't reproduce your issue (all the assertions passed on master).
This issue reproduces on master:
Error: expect(received).rejects.toThrow()
Received promise resolved instead of rejected
Resolved to value: "โค YN0000: โ Resolution step
::group::Resolution step
::endgroup::
โค YN0000: โ Completed in 0.44s
โค YN0000: โ Fetch step
::group::Fetch step
โค YN0013: โ No packages were cached - 3 packages had to be fetched
::endgroup::
โค YN0000: โ Completed in 42.94s
โค YN0000: โ Link step
::group::Link step
::endgroup::
โค YN0000: โ Completed
โค YN0000: Done in 43.43s
"
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0ac41999f0.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:7:7)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-a57989414f.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-a57989414f.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-a57989414f.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
This issue reproduces on master:
Error: expect(received).rejects.toThrow()
Received promise resolved instead of rejected
Resolved to value: "โค YN0000: โ Resolution step
::group::Resolution step
::endgroup::
โค YN0000: โ Completed in 0.42s
โค YN0000: โ Fetch step
::group::Fetch step
โค YN0013: โ No packages were cached - 3 packages had to be fetched
::endgroup::
โค YN0000: โ Completed in 41.26s
โค YN0000: โ Link step
::group::Link step
::endgroup::
โค YN0000: โ Completed
โค YN0000: Done in 41.74s
"
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0ac41999f0.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:7:7)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-a57989414f.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-a57989414f.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-a57989414f.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
๐ค Looks like yet another one of those "not yet implemented, but somehow documented" features that somehow somebody took the time document. ๐
I'm going to implement it soon ๐
Most helpful comment
๐ค Looks like yet another one of those "not yet implemented, but somehow documented" features that somehow somebody took the time document. ๐
I'm going to implement it soon ๐