Skip to content

Commit bb0dff3

Browse files
chrysnSergioGasquez
authored andcommitted
Only export LIBCLANG_PATH and PATH if export is set
Closes: #35
1 parent d3791ee commit bb0dff3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ This action can be configured in various ways using its inputs:
5454
| `version` | Which version of the toolchain to install | string | _latest_ |
5555
| `ldproxy` | Whether to install `ldproxy` (required for `std`) | bool | `true` |
5656
| `override` | Overrides the installed toolchain | bool | `true` |
57+
| `export` | Sources `${ESPUP_EXPORT_FILE}` | bool | `true` |
5758

5859
All inputs are optional; if no inputs are provided:
5960

action.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ inputs:
2222
override:
2323
description: Whether to override the toolchain
2424
default: true
25+
export:
26+
description: Whether to export the `${ESPUP_EXPORT_FILE}` into the GitHub environment
27+
default: true
2528

2629
runs:
2730
using: composite
@@ -65,8 +68,10 @@ runs:
6568
[[ "${{ inputs.version }}" != latest ]] && version="--toolchain-version ${{ inputs.version }}" || version=""
6669
"$HOME/.cargo/bin/espup" install -l debug --targets ${{ inputs.buildtargets }} $version
6770
source "$HOME/exports"
68-
echo "$PATH" >> "$GITHUB_PATH"
69-
echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >> "$GITHUB_ENV"
71+
if [[ "${{ inputs.export }}" = true ]]; then
72+
echo "$PATH" >> "$GITHUB_PATH"
73+
echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >> "$GITHUB_ENV"
74+
fi
7075
7176
- name: Install Xtensa toolchain (Windows)
7277
if: env.HOST_TARGET == 'x86_64-pc-windows-msvc'

0 commit comments

Comments
 (0)