Skip to content

Commit bfd0d50

Browse files
committed
build
1 parent 1f57fc5 commit bfd0d50

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
6262
# Whether to download Git-LFS files
6363
# Default: false
6464
lfs: ''
65+
66+
# Whether to silent failure
67+
# Default: false
68+
silentFailure: ''
6569
```
6670
<!-- end usage -->
6771

dist/index.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2611,7 +2611,18 @@ function run() {
26112611
// Register problem matcher
26122612
coreCommand.issueCommand('add-matcher', {}, path.join(__dirname, 'problem-matcher.json'));
26132613
// Get sources
2614-
yield gitSourceProvider.getSource(sourceSettings);
2614+
try {
2615+
yield gitSourceProvider.getSource(sourceSettings);
2616+
}
2617+
catch (error) {
2618+
core.setOutput('failure', 'true');
2619+
if (sourceSettings.silentFailure) {
2620+
core.info(`Silent Failure: ${error.message}`);
2621+
}
2622+
else {
2623+
throw error;
2624+
}
2625+
}
26152626
}
26162627
finally {
26172628
// Unregister problem matcher
@@ -10405,6 +10416,9 @@ function getInputs() {
1040510416
core.debug(`lfs = ${result.lfs}`);
1040610417
// Access token
1040710418
result.accessToken = core.getInput('token');
10419+
// Silent Failure
10420+
result.silentFailure =
10421+
(core.getInput('silentFailure') || 'false').toUpperCase() === 'TRUE';
1040810422
return result;
1040910423
}
1041010424
exports.getInputs = getInputs;

0 commit comments

Comments
 (0)