Skip to content

Moving with glob pattern fails on Windows but works fine on Linux #226

@t00

Description

@t00

I have a part of a script which copies playwright tests artifacts from a temporary folder to a permanent one. The purpose is to copy all subdirectories from the test-results/ directory to the results/ directory.

shx mv test-results/** results/

When running on Linux it does not output anything and copies directories as expected.

On Windows it throws the following error:

mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-1.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-10.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-11.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-12.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-13.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-14.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-15.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-16.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-2.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-3.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-4.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-5.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-6.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-7.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-8.png
mv: no such file or directory: test-results/playwright-8247-monitor-co-76a6b-or---Connections-tab-8247-1-Chrome-Stable/test-failed-9.png
ERROR: "playwright:run2:8247" exited with 1.

I am using forward slashes on both but possibly on Windows these are not handled the same way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions