diff --git a/scopes/workspace/install/install.cmd.tsx b/scopes/workspace/install/install.cmd.tsx index 017766b90f1e..390eec969c6c 100644 --- a/scopes/workspace/install/install.cmd.tsx +++ b/scopes/workspace/install/install.cmd.tsx @@ -135,22 +135,16 @@ function formatOutput({ } export function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string { - // oldNonLoadedEnvs = ['my-org.my-scope/envs/my-react-env'] if (!oldNonLoadedEnvs.length) return ''; const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', '); - const firstPart = `The following environments are not loaded: ${chalk.cyan( - oldNonLoadedEnvsStr - )} and doesn't contain env.jsonc file`; - const docsLink = `Read more about how to fix this issue in:`; - const installAgain = `Please run "bit install" again to make sure all dependencies installed correctly`; + const firstPart = `Bit is unable to install all dependencies. Please run "${chalk.cyan('bit install')}" again `; const flag = chalk.cyan(`--${recurringInstallFlagName}`); - const suggestRecurringInstall = `You can add the ${flag} flag to automatically run "bit install" again. but it is recommended to fix this issue`; - let msg = `${firstPart}\n${installAgain}\n${suggestRecurringInstall}\n${docsLink}`; + const suggestRecurringInstall = recurringInstall ? '' : `(or use the "${flag}" option next time).`; + const envsStr = `The following environments need to add support for "dependency policy" to fix the warning: ${chalk.cyan( + oldNonLoadedEnvsStr + )}`; + const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`; - if (recurringInstall) { - const autoInstallAgain = - 'bit run install again for you to make sure all dependencies installed correctly, but it is recommended to fix this issue'; - msg = `${firstPart}\n${autoInstallAgain}\n${docsLink}`; - } + const msg = `${firstPart}${suggestRecurringInstall}\n${envsStr}\n${docsLink}`; return chalk.yellow(msg); }