Adds option to trim output (#9)

This commit is contained in:
Min Huang
2021-05-26 02:47:18 -07:00
committed by GitHub
parent 74dc4b4435
commit 38dbfa4e4a
5 changed files with 6970 additions and 3 deletions

View File

@@ -5,7 +5,12 @@ const { promises: fs } = require('fs')
const main = async () => {
const path = core.getInput('path')
const content = await fs.readFile(path, 'utf8')
const trim = core.getBooleanInput('trim')
let content = await fs.readFile(path, 'utf8')
if (trim) {
content = content.trim
}
core.setOutput('content', content)
}