mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 12:57:47 +00:00
Corrected dependency installation systems (#7088)
* Avoid unnecessary Gemfile installations * Do not bundle `.output` or `.vercel` into Lambdas * Use the same input hash format for all CLI Plugins and `vercel build` * Fixed unit tests * Fixed the unit tests again * Fixed the unit tests * Fixed all the tests * Exclude useless files * Consider `.vercelignore` and `.nowignore` * Fixed error * Reverted changes * Deleted useless file * Fixed tests * Share input hash format with `vercel-plugin-node` * Make output inspectable * Fixed build error * Extended comment * Bump Ruby version * Update Gemfiles * Update bundles * Fixed tests Co-authored-by: Andy Bitz <artzbitz@gmail.com>
This commit is contained in:
@@ -61,18 +61,27 @@ function getRubyPath(meta: Meta, gemfileContents: string) {
|
||||
// process.env.GEM_HOME), and returns
|
||||
// the absolute path to it
|
||||
export async function installBundler(meta: Meta, gemfileContents: string) {
|
||||
const { gemHome, rubyPath, gemPath, vendorPath, runtime } = getRubyPath(
|
||||
meta,
|
||||
gemfileContents
|
||||
);
|
||||
|
||||
// If the new File System API is used (`avoidTopLevelInstall`), the Install Command
|
||||
// will have already installed the dependencies, so we don't need to do it again.
|
||||
if (meta.avoidTopLevelInstall) {
|
||||
debug(
|
||||
`Skipping bundler installation, already installed by Install Command`
|
||||
);
|
||||
}
|
||||
|
||||
const { gemHome, rubyPath, gemPath, vendorPath, runtime } = getRubyPath(
|
||||
meta,
|
||||
gemfileContents
|
||||
);
|
||||
return {
|
||||
gemHome,
|
||||
rubyPath,
|
||||
gemPath,
|
||||
vendorPath,
|
||||
runtime,
|
||||
bundlerPath: join(gemHome, 'bin', 'bundler'),
|
||||
};
|
||||
}
|
||||
|
||||
debug('installing bundler...');
|
||||
await execa(gemPath, ['install', 'bundler', '--no-document'], {
|
||||
|
||||
Reference in New Issue
Block a user