Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set 5 fetch retries #8305

Merged
merged 2 commits into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scopes/dependencies/pnpm/pnpm.package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@ import type { RebuildFn } from './lynx';
export class PnpmPackageManager implements PackageManager {
readonly name = 'pnpm';

public readConfig = memoize(readConfig);
private _readConfig = async (dir?: string) => {
const { config, warnings } = await readConfig(dir);
if (config?.fetchRetries && config?.fetchRetries < 5) {
config.fetchRetries = 5;
return { config, warnings };
}

return { config, warnings };
};

public readConfig = memoize(this._readConfig);

constructor(private depResolver: DependencyResolverMain, private logger: Logger) {}

async install(
Expand Down