[build-utils][node][python][ruby] Update error message for EOL runtimes (#8167)

This PR updates the error message when the runtime version detected is EOL
This commit is contained in:
Steven
2022-07-15 15:38:38 -04:00
committed by GitHub
parent 181a492d91
commit 4f4a42813f
8 changed files with 15 additions and 23 deletions

View File

@@ -56,12 +56,10 @@ function getRubyPath(meta: Meta, gemfileContents: string) {
const latest = getLatestRubyVersion();
const intro = `Found \`Gemfile\` with discontinued Ruby version: \`${line}.\``;
const hint = `Please set \`ruby "~> ${latest.range}"\` in your \`Gemfile\` to use Ruby ${latest.range}.`;
const upstream =
'This change is the result of a decision made by an upstream infrastructure provider (AWS).';
throw new NowBuildError({
code: 'RUBY_DISCONTINUED_VERSION',
link: 'http://vercel.link/ruby-version',
message: `${intro} ${hint} ${upstream}`,
message: `${intro} ${hint}`,
});
}
}

View File

@@ -26,7 +26,7 @@ const fixturesPath = path.resolve(__dirname, 'fixtures');
const testsThatFailToBuild = new Map([
[
'11-version-2-5-error',
'Found `Gemfile` with discontinued Ruby version: `ruby "~> 2.5.x".` Please set `ruby "~> 2.7.x"` in your `Gemfile` to use Ruby 2.7.x. This change is the result of a decision made by an upstream infrastructure provider (AWS).',
'Found `Gemfile` with discontinued Ruby version: `ruby "~> 2.5.x".` Please set `ruby "~> 2.7.x"` in your `Gemfile` to use Ruby 2.7.x.',
],
]);