Skip to content

Commit

Permalink
Fixes issues with boolean inputs
Browse files Browse the repository at this point in the history
kenorb committed Jun 13, 2020
1 parent 62a410e commit 1fe3dbc
Showing 4 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -12,3 +12,5 @@ jobs:
- uses: actions/checkout@v2
- name: Run local action
uses: ./
with:
verbose: true
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ inputs:
mt-cleanup:
description: 'Whether to remove extracted metaeditor files after compilation'
required: false
default: true
default: false
ignore-warnings:
description: 'Whether to ignore compilation warnings'
required: false
20 changes: 10 additions & 10 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -9390,21 +9390,21 @@ const realRun = true

const input = realRun
? {
checkSyntaxOnly: (core.getInput('check-syntax-only') || 'false').toUpperCase() === 'TRUE',
compilePath: core.getInput('path'),
metaTraderVersion: core.getInput('mt-version'),
metaTraderCleanUp: core.getInput('mt-cleanup'),
ignoreWarnings: core.getInput('ignore-warnings'),
ignoreWarnings: (core.getInput('ignore-warnings') || 'false').toUpperCase() === 'TRUE',
logFilePath: core.getInput('log-file'),
checkSyntaxOnly: core.getInput('check-syntax-only'),
verbose: core.getInput('verbose')
metaTraderCleanUp: (core.getInput('mt-cleanup') || 'false').toUpperCase() === 'TRUE',
metaTraderVersion: core.getInput('mt-version'),
verbose: (core.getInput('verbose') || 'false').toUpperCase() === 'TRUE'
}
: {
checkSyntaxOnly: false,
compilePath: '.',
metaTraderVersion: '5.0.0.2361',
metaTraderCleanUp: true,
ignoreWarnings: false,
logFilePath: 'my-custom-log.log',
checkSyntaxOnly: false,
metaTraderCleanUp: true,
metaTraderVersion: '5.0.0.2361',
verbose: true
}

@@ -9477,9 +9477,9 @@ try {
let command

if (metaTraderMajorVersion === '5')
command = `"MetaTrader 5/metaeditor64.exe" ${checkSyntaxParam} /compile:"${input.compilePath}" /log:"${input.logFilePath}"`
command = `"MetaTrader 5/metaeditor64.exe" /compile:"${input.compilePath}" /log:"${input.logFilePath}" ${checkSyntaxParam}`
else
command = `"MetaTrader 4/metaeditor.exe" ${checkSyntaxParam} /compile:"${input.compilePath}" /log:"${input.logFilePath}"`
command = `"MetaTrader 4/metaeditor.exe" /compile:"${input.compilePath}" /log:"${input.logFilePath}" ${checkSyntaxParam}`

input.verbose && console.log(`Executing: ${command}`)

20 changes: 10 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -15,21 +15,21 @@ const realRun = true

const input = realRun
? {
checkSyntaxOnly: (core.getInput('check-syntax-only') || 'false').toUpperCase() === 'TRUE',
compilePath: core.getInput('path'),
metaTraderVersion: core.getInput('mt-version'),
metaTraderCleanUp: core.getInput('mt-cleanup'),
ignoreWarnings: core.getInput('ignore-warnings'),
ignoreWarnings: (core.getInput('ignore-warnings') || 'false').toUpperCase() === 'TRUE',
logFilePath: core.getInput('log-file'),
checkSyntaxOnly: core.getInput('check-syntax-only'),
verbose: core.getInput('verbose')
metaTraderCleanUp: (core.getInput('mt-cleanup') || 'false').toUpperCase() === 'TRUE',
metaTraderVersion: core.getInput('mt-version'),
verbose: (core.getInput('verbose') || 'false').toUpperCase() === 'TRUE'
}
: {
checkSyntaxOnly: false,
compilePath: '.',
metaTraderVersion: '5.0.0.2361',
metaTraderCleanUp: true,
ignoreWarnings: false,
logFilePath: 'my-custom-log.log',
checkSyntaxOnly: false,
metaTraderCleanUp: true,
metaTraderVersion: '5.0.0.2361',
verbose: true
}

@@ -102,9 +102,9 @@ try {
let command

if (metaTraderMajorVersion === '5')
command = `"MetaTrader 5/metaeditor64.exe" ${checkSyntaxParam} /compile:"${input.compilePath}" /log:"${input.logFilePath}"`
command = `"MetaTrader 5/metaeditor64.exe" /compile:"${input.compilePath}" /log:"${input.logFilePath}" ${checkSyntaxParam}`
else
command = `"MetaTrader 4/metaeditor.exe" ${checkSyntaxParam} /compile:"${input.compilePath}" /log:"${input.logFilePath}"`
command = `"MetaTrader 4/metaeditor.exe" /compile:"${input.compilePath}" /log:"${input.logFilePath}" ${checkSyntaxParam}`

input.verbose && console.log(`Executing: ${command}`)

0 comments on commit 1fe3dbc

Please sign in to comment.