Add to PATH.

This commit is contained in:
Miles Johnson 2023-04-15 17:02:22 -07:00
parent c3ef13296b
commit 64b109dfe7
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,4 @@
name: 'Setup Rust' name: 'Setup rustup toolchain'
author: 'Miles Johnson' author: 'Miles Johnson'
description: 'Sets up Rust and Cargo.' description: 'Sets up Rust and Cargo.'
inputs: inputs:

View file

@ -1,4 +1,5 @@
import fs from 'fs'; import fs from 'fs';
import os from 'os';
import path from 'path'; import path from 'path';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
@ -135,6 +136,10 @@ async function run() {
// Always enable colored output // Always enable colored output
core.exportVariable('CARGO_TERM_COLOR', 'always'); core.exportVariable('CARGO_TERM_COLOR', 'always');
core.info('Adding ~/.cargo/bin to PATH');
core.addPath(path.join(os.homedir(), '.cargo', 'bin'));
} }
void run(); void run();