fix: update shell wrapper registration to use directory path and improve echo statements
This commit is contained in:
parent
8b0eaf3b2a
commit
91e3790b1b
1 changed files with 5 additions and 7 deletions
12
action.yml
12
action.yml
|
|
@ -157,7 +157,7 @@ runs:
|
||||||
TEMP_DIR="${RUNNER_TEMP:-/tmp}"
|
TEMP_DIR="${RUNNER_TEMP:-/tmp}"
|
||||||
WRAPPER_DIR=$(mktemp -d "$TEMP_DIR/setup-ssh-client-XXXXXX")
|
WRAPPER_DIR=$(mktemp -d "$TEMP_DIR/setup-ssh-client-XXXXXX")
|
||||||
mkdir -p "$WRAPPER_DIR"
|
mkdir -p "$WRAPPER_DIR"
|
||||||
WRAPPER_PATH="$(mktemp "$WRAPPER_DIR/ssh-remote-shell-XXXXXX.sh")"
|
WRAPPER_PATH=${mktemp "$WRAPPER_DIR/ssh-remote-shell-XXXXXX.sh"}
|
||||||
|
|
||||||
cat << 'WRAPPER_EOF' > "$WRAPPER_PATH"
|
cat << 'WRAPPER_EOF' > "$WRAPPER_PATH"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
@ -207,10 +207,8 @@ runs:
|
||||||
if: inputs.use-shell-wrapper == 'true'
|
if: inputs.use-shell-wrapper == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
SHELL_WRAPPER_PATH="${{ steps.setup-shell-wrapper.outputs.shell-wrapper-path }}"
|
SHELL_WRAPPER_DIR="${{ steps.setup-shell-wrapper.outputs.shell-wrapper-dir }}"
|
||||||
# Register custom shell for this job by mapping the shell name to the
|
# Register custom shell for this job
|
||||||
# wrapper path. This is the recommended way to expose a custom shell
|
echo "Adding custom shell 'ssh-remote' to PATH"
|
||||||
# for `shell: ssh-remote` in subsequent steps. We do this conditionally
|
echo "PATH=$SHELL_WRAPPER_DIR:$PATH" >> $GITHUB_ENV
|
||||||
# so `use-shell-wrapper` can be used to opt out.
|
|
||||||
echo "ssh-remote=$SHELL_WRAPPER_PATH {0}" >> "$GITHUB_ENV"
|
|
||||||
echo "✅ Custom shell 'ssh-remote' registered for this job"
|
echo "✅ Custom shell 'ssh-remote' registered for this job"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue