Await properly for commands to finish
This commit is contained in:
parent
c5f5da5693
commit
5e61fdf6fd
@ -24,8 +24,8 @@ function run() {
|
|||||||
const version = core.getInput('rust-version');
|
const version = core.getInput('rust-version');
|
||||||
if (version) {
|
if (version) {
|
||||||
yield rustup.install(version);
|
yield rustup.install(version);
|
||||||
exec.exec('rustup', ['default', version]);
|
yield exec.exec('rustup', ['default', version]);
|
||||||
exec.exec('rustup', ['update', version]);
|
yield exec.exec('rustup', ['update', version]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
@ -9,9 +9,8 @@ async function run() {
|
|||||||
|
|
||||||
if(version) {
|
if(version) {
|
||||||
await rustup.install(version);
|
await rustup.install(version);
|
||||||
|
await exec.exec('rustup', ['default', version]);
|
||||||
exec.exec('rustup', ['default', version]);
|
await exec.exec('rustup', ['update', version]);
|
||||||
exec.exec('rustup', ['update', version]);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user