Skip to content

Commit

Permalink
feat: another variation
Browse files Browse the repository at this point in the history
..that is often seen on Windows like this:
```
An unexpected error occurred: "https://registry.yarnpkg.com/@private/ngffwd-node-processes/-/ngffwd-node-processes-1.0.123.tgz: Request failed "404 Not Found".
```

re yarnpkg/yarn#2738
  • Loading branch information
artemv committed Jan 6, 2020
1 parent ee61d76 commit 2e3aaa7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -10,7 +10,7 @@ module.exports = function (command, args, options, callback) {
process.env.npm_config_color = 0;

var attempt = exec(runCmd, function (err, stdout, stderr) {
matchers = [/unexpected end of file/ig, /the registry may be down/ig];
matchers = [/unexpected end of file/ig, /the registry may be down/ig, /Request failed "404/ig];
var match = matchers.some(function (matcher) {
return stdout.match(matcher) || stderr.match(matcher);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "yarn-retry",
"description": "retry yarn when it fails",
"version": "1.1.0",
"version": "1.2.0",
"repository": {
"url": "git://github.com/artemv/yarn-retry.git"
},
Expand Down
1 change: 1 addition & 0 deletions test/main.tests.js
Expand Up @@ -27,4 +27,5 @@ describe('npm-install-retry', function () {
}

testRetries('echo An unexpected error occurred: "https://registry.yarnpkg.com/@private/ngffwd-node-processes/-/ngffwd-node-processes-1.0.123.tgz: unexpected end of file".');
testRetries('echo An unexpected error occurred: "https://registry.yarnpkg.com/@private/ngffwd-node-processes/-/ngffwd-node-processes-1.0.123.tgz: Request failed \\"404 Not Found\\"".');
});

0 comments on commit 2e3aaa7

Please sign in to comment.