mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
14 lines
309 B
JavaScript
14 lines
309 B
JavaScript
'use strict'
|
|
module.exports = Base => class extends Base {
|
|
warn (msg, data) {
|
|
if (!this.strict)
|
|
this.emit('warn', msg, data)
|
|
else if (data instanceof Error)
|
|
this.emit('error', data)
|
|
else {
|
|
const er = new Error(msg)
|
|
er.data = data
|
|
this.emit('error', er)
|
|
}
|
|
}
|
|
}
|