Skip to content

Commit

Permalink
ssh fix annote param
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Apr 27, 2024
1 parent 13dae78 commit aed72fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/sshx-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ const fs = require('fs')
// read job info from stdin (sent by Cronicle engine)
const job = JSON.parse(fs.readFileSync(process.stdin.fd))

let pref = ''
if(job.params.annotate) pref = `[${new Date().toISOString()}] `
let pref = !!job.params.annotate

const print = (text) => process.stdout.write(pref + text + EOL)
const print = (text) => process.stdout.write((pref ? `[${new Date().toISOString()}] ` : '') + text + EOL)
const printInfo = (text) => process.stdout.write(`[INFO] \x1b[32m${text}\x1b[0m` + EOL)
const printWarning = (text) => process.stdout.write(`[INFO] \x1b[33m${text}\x1b[0m` + EOL)
const printError = (text) => process.stdout.write(`\x1b[31m${text}\x1b[0m` + EOL)
Expand Down

0 comments on commit aed72fb

Please sign in to comment.