Files
julia-processcoverage/src/main.ts
David Anthoff 602be2cb75 Fix bug
2020-03-23 12:00:50 -07:00

21 lines
522 B
TypeScript

import * as core from '@actions/core'
import * as exec from '@actions/exec'
import * as path from 'path';
async function run(): Promise<void> {
try {
if (require.main) {
let rootPath = path.normalize(path.join(path.dirname(require.main.filename), '..'));
await exec.exec('julia', ['--color=yes', path.join(rootPath, 'src', 'main.jl')]);
}
else {
core.setFailed('Require method to load root path did not work.')
}
} catch (error) {
core.setFailed(error.message)
}
}
run()