From 64b109dfe7a197ea21fbe72e8c809de16ce85484 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Sat, 15 Apr 2023 17:02:22 -0700 Subject: [PATCH] Add to PATH. --- action.yml | 2 +- index.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 97b1171..df3862d 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'Setup Rust' +name: 'Setup rustup toolchain' author: 'Miles Johnson' description: 'Sets up Rust and Cargo.' inputs: diff --git a/index.ts b/index.ts index 651b7f5..7cc9022 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,5 @@ import fs from 'fs'; +import os from 'os'; import path from 'path'; import * as core from '@actions/core'; import * as exec from '@actions/exec'; @@ -135,6 +136,10 @@ async function run() { // Always enable colored output core.exportVariable('CARGO_TERM_COLOR', 'always'); + + core.info('Adding ~/.cargo/bin to PATH'); + + core.addPath(path.join(os.homedir(), '.cargo', 'bin')); } void run();