Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

The node_script_path variable was being reassigned inside the file processing loop, causing subsequent files to be moved from the wrong location when multiple scripts needed relocation due to noexec mounts.

Changes:

  • Introduced cwd_path variable to track destination directory separately from source path
  • node_script_path now remains constant throughout the loop as the source location
  • Only cwd_path is updated when files are moved to executable directories

Before:

for file in self._files:
    # ... copy file to node_script_path ...
    node_script_path = self._move_files_into_executable_dir(
        node_script_path, file  # BUG: reassigns source path
    )
self._cwd = node_script_path

After:

cwd_path = node_script_path
for file in self._files:
    # ... copy file to node_script_path ...
    cwd_path = self._move_files_into_executable_dir(
        node_script_path, file  # source path stays constant
    )
self._cwd = cwd_path

This ensures all files are moved from their original copied location rather than attempting to move from an already-relocated path.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Dec 26, 2025
Copilot AI changed the title [WIP] Address feedback on modprobe tool fix PR Fix multiple file handling in CustomScript noexec workaround Dec 26, 2025
Copilot AI requested a review from lubaihua33 December 26, 2025 04:39
@lubaihua33 lubaihua33 force-pushed the baihua/fix_netvsc branch 4 times, most recently from d0e7863 to 5d2d12c Compare December 31, 2025 02:07
Base automatically changed from baihua/fix_netvsc to main January 4, 2026 02:39
@lubaihua33 lubaihua33 closed this Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants