Merge pull request #71 from useblacksmith/subdue-noisy-log

main: ignore error when nothing is mounted
pull/1358/head
Aditya Maru 9 months ago committed by GitHub
commit c7c50538d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

@ -397,8 +397,11 @@ actionsToolkit.run(
core.info('Unmounted device');
}
} catch (error) {
// Only log warning if error is not from grep finding no mounts
if (!error.message.includes('exit code 1')) {
// grep returns exit code 1 when no matches are found.
if (error.code === 1) {
core.debug('No dangling mounts found to clean up');
} else {
// Only warn for actual errors, not for the expected case where grep finds nothing.
core.warning(`Error during cleanup: ${error.message}`);
}
}

Loading…
Cancel
Save