Improve multiple lock file warning

Fixes #138174
This commit is contained in:
Alex Ross 2021-12-08 14:48:04 +01:00
parent fec4856aff
commit 0c202aa22a
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840

View file

@ -136,7 +136,7 @@ export async function getPackageManager(extensionContext: ExtensionContext, fold
packageManagerName = name;
const neverShowWarning = 'npm.multiplePMWarning.neverShow';
if (showWarning && multiplePMDetected && !extensionContext.globalState.get<boolean>(neverShowWarning)) {
const multiplePMWarning = localize('npm.multiplePMWarning', 'Using {0} as the preferred package manager. Found multiple lockfiles for {1}.', packageManagerName, folder.fsPath);
const multiplePMWarning = localize('npm.multiplePMWarning', 'Using {0} as the preferred package manager. Found multiple lockfiles for {1}. To resolve this issue, delete the lockfiles that don\'t match your preferred package manager or change the setting "npm.packageManager" to a value other than "auto".', packageManagerName, folder.fsPath);
const neverShowAgain = localize('npm.multiplePMWarning.doNotShow', "Do not show again");
const learnMore = localize('npm.multiplePMWarning.learnMore', "Learn more");
window.showInformationMessage(multiplePMWarning, learnMore, neverShowAgain).then(result => {