diff --git a/action.yml b/action.yml index 37fe45d..d50fe74 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,10 @@ inputs: description: 'Architecture of the Julia binaries. Defaults to x64.' required: false default: 'x64' + show-versioninfo: + description: 'Display InteractiveUtils.versioninfo() after installing' + required: false + default: 'false' runs: using: 'node12' main: 'lib/setup-julia.js' diff --git a/lib/setup-julia.js b/lib/setup-julia.js index c7b8a62..25781d1 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -43,8 +43,12 @@ function run() { } // Add it to PATH core.addPath(path.join(juliaPath, 'bin')); - // Test if Julia has been installed by showing versioninfo() - yield exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']); + // Test if Julia has been installed + exec.exec('julia', ['--version']); + // If enabled, also show the full version info + if (core.getInput('show-versioninfo') == 'true') { + exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']); + } } catch (error) { core.setFailed(error.message); diff --git a/src/setup-julia.ts b/src/setup-julia.ts index 028ed68..4dd38e9 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -32,8 +32,13 @@ async function run() { // Add it to PATH core.addPath(path.join(juliaPath, 'bin')) - // Test if Julia has been installed by showing versioninfo() - await exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']) + // Test if Julia has been installed + exec.exec('julia', ['--version']) + + // If enabled, also show the full version info + if (core.getInput('show-versioninfo') == 'true') { + exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']) + } } catch (error) { core.setFailed(error.message) }