diff --git a/lib/setup-julia.js b/lib/setup-julia.js index c93f9f7..42ebdd3 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -78,13 +78,16 @@ function run() { core.addPath(path.join(juliaPath, 'bin')); // Set output core.setOutput('julia-bindir', path.join(juliaPath, 'bin')); - // Test if Julia has been installed - exec.exec('julia', ['--version']); - // If enabled, also show the full version info + // Test if Julia has been installed and print the version if (core.getInput('show-versioninfo') == 'true') { + // If enabled, show the full version info // --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()']); } + else { + // Otherwise only print julia --version to save time + exec.exec('julia', ['--version']); + } } catch (error) { core.setFailed(error.message); diff --git a/src/setup-julia.ts b/src/setup-julia.ts index bf62727..08bab8d 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -73,14 +73,15 @@ async function run() { // Set output core.setOutput('julia-bindir', path.join(juliaPath, 'bin')) - - // Test if Julia has been installed - exec.exec('julia', ['--version']) - // If enabled, also show the full version info + // Test if Julia has been installed and print the version if (core.getInput('show-versioninfo') == 'true') { + // If enabled, show the full version info // --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()']) + } else { + // Otherwise only print julia --version to save time + exec.exec('julia', ['--version']) } } catch (error) { core.setFailed(error.message)