mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
Don't print version twice if show-versioninfo is enabled
This commit is contained in:
9
lib/setup-julia.js
generated
9
lib/setup-julia.js
generated
@@ -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);
|
||||
|
||||
@@ -74,13 +74,14 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user