fix path expansion problem
This commit is contained in:
@@ -281,7 +281,8 @@ jobs:
|
||||
docker exec rhel-build bash -lc 'export PYENV_ROOT="/root/.pyenv"; export PATH="$PYENV_ROOT/bin:$PATH"; /root/.pyenv/bin/pyenv install -s 3.12.0; /root/.pyenv/bin/pyenv global 3.12.0; /root/.pyenv/bin/pyenv rehash'
|
||||
|
||||
# Install Poetry inside the container using the official installer (install to /root/.local/bin)
|
||||
docker exec rhel-build bash -lc "export PATH=\"/root/.pyenv/shims:/root/.pyenv/bin:$PATH\"; curl -sSL https://install.python-poetry.org | python3 - --yes"
|
||||
# Use single quotes so PATH is evaluated inside the container shell rather than the runner
|
||||
docker exec rhel-build bash -lc 'export PATH="/root/.pyenv/shims:/root/.pyenv/bin:$PATH"; curl -sSL https://install.python-poetry.org | python3 - --yes'
|
||||
|
||||
# Verify Poetry is available via explicit path if not on PATH
|
||||
docker exec rhel-build bash -lc "/root/.local/bin/poetry --version || echo 'Poetry not found in /root/.local/bin'"
|
||||
@@ -292,8 +293,9 @@ jobs:
|
||||
- name: Build inside container using Poetry
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Use poetry inside the container to build package layouts
|
||||
docker exec rhel-build bash -lc "export PATH=\"$HOME/.local/bin:$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH\" && cd /workspace && poetry install --no-interaction && poetry run python scripts/build_package_linux.py"
|
||||
# Use poetry inside the container to build package layouts. Use explicit paths so the runner shell
|
||||
# doesn't expand $HOME; expansion should occur inside the container.
|
||||
docker exec rhel-build bash -lc 'export PATH="/root/.local/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH" && cd /workspace && /root/.local/bin/poetry install --no-interaction && /root/.local/bin/poetry run python scripts/build_package_linux.py'
|
||||
|
||||
- name: Package RHEL (fpm) inside container
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user