You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I just changed the command to shx cp -r test-results/* results/ and the contents are copied correctly. This suggests some globbing pattern emulation differences on Windows.
Why not just try shx cp -r test-results/ results/? You should run this before the results folder is created. This command will then create results/ and all of its sub directories will match the subdirectories of test-results/.
No need for glob expressions and it's a lot simpler. Let me know if I've misunderstood your goal.
Regarding glob expressions, please read https://github.com/shelljs/shx#packagejson (the globbing guidance applies whether it's in package.json or not—I should refactor that guidance into a new section of the documentation).
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:
I am using forward slashes on both but possibly on Windows these are not handled the same way?
The text was updated successfully, but these errors were encountered: