From 70872e468c429df6f1e22e55dce5a2cc22443646 Mon Sep 17 00:00:00 2001 From: Torsten Wierschin Date: Fri, 17 Jul 2026 12:48:41 +0200 Subject: [PATCH] fix(migrate): use absolute repo path when invoking app/run_docker.sh; compute MODULE_ABS relative to repo root\n\nThis avoids ambiguous '../sandbox' usage and ensures CMD_ARGS are forwarded into the container correctly.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- migration/migrate_module.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/migration/migrate_module.sh b/migration/migrate_module.sh index 4faf98e07..50470c640 100755 --- a/migration/migrate_module.sh +++ b/migration/migrate_module.sh @@ -21,12 +21,16 @@ while [[ $# -gt 0 ]]; do esac done -# Ensure path is relative to repo root -MODULE_ABS="/repo/$(realpath --relative-to=$(pwd) "$MODULE_PATH")" +# Ensure path is relative to repo root and compute absolute module path inside container +REPO_DIR="$(pwd)" +MODULE_ABS="/repo/$(realpath --relative-to="$REPO_DIR" "$MODULE_PATH")" # Use app/run_docker.sh to run the migration inside the prepared Qt6 image # The container will configure just the requested module in a clean build directory. -./app/run_docker.sh ../sandbox -- bash -lc "set -euo pipefail && export LD_LIBRARY_PATH=/opt/Qt/6.8.3/gcc_64/lib:\${LD_LIBRARY_PATH:-} && export QT_QPA_PLATFORM=offscreen && rm -rf /repo/build && mkdir -p /repo/build && cd /repo/build && \ cmake -S /repo -B /repo/build -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -DCMAKE_CXX_STANDARD=20 -DMIGRATE_MODULE=${MODULE_PATH} -DBUILD_TESTING=ON && \ cmake --build /repo/build -- -j${JOBS} && ctest --test-dir /repo/build --output-on-failure" +./app/run_docker.sh "$REPO_DIR" -- bash -lc \ + "set -euo pipefail && export LD_LIBRARY_PATH=/opt/Qt/6.8.3/gcc_64/lib:\${LD_LIBRARY_PATH:-} && export QT_QPA_PLATFORM=offscreen && rm -rf /repo/build && mkdir -p /repo/build && cd /repo/build && \ + cmake -S /repo -B /repo/build -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -DCMAKE_CXX_STANDARD=20 -DMIGRATE_MODULE=${MODULE_PATH} -DBUILD_TESTING=ON && \ + cmake --build /repo/build -- -j${JOBS} && ctest --test-dir /repo/build --output-on-failure" echo "Migration run for module ${MODULE_PATH} finished. Check ./build for logs and artifacts."