mirror of
https://gitea.com/actions/setup-node.git
synced 2025-07-07 20:40:06 +08:00
Compare commits
2 Commits
users/eric
...
v2.0.0
Author | SHA1 | Date | |
---|---|---|---|
e434342e4e | |||
7c6182c745 |
@ -8,6 +8,7 @@ This action sets by node environment for use in actions by:
|
|||||||
|
|
||||||
- optionally downloading and caching a version of node - npm by version spec and add to PATH
|
- optionally downloading and caching a version of node - npm by version spec and add to PATH
|
||||||
- registering problem matchers for error output
|
- registering problem matchers for error output
|
||||||
|
- configuring authentication for GPR or npm
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ steps:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: '10.x'
|
node-version: '12'
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm test
|
- run: npm test
|
||||||
```
|
```
|
||||||
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -10943,7 +10943,7 @@ function downloadTool(url, dest, auth) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Otherwise retry
|
// Otherwise retry
|
||||||
return false;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -10965,7 +10965,6 @@ function downloadToolAttempt(url, dest, auth) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
const response = yield http.get(url, headers);
|
const response = yield http.get(url, headers);
|
||||||
throw new HTTPError(500);
|
|
||||||
if (response.message.statusCode !== 200) {
|
if (response.message.statusCode !== 200) {
|
||||||
const err = new HTTPError(response.message.statusCode);
|
const err = new HTTPError(response.message.statusCode);
|
||||||
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
|
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
|
||||||
|
Reference in New Issue
Block a user