Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent file tree depending on OS #47

Open
adrien-febvay opened this issue Jan 19, 2024 · 5 comments
Open

Inconsistent file tree depending on OS #47

adrien-febvay opened this issue Jan 19, 2024 · 5 comments

Comments

@adrien-febvay
Copy link

Consider the following file tree:

dist-tmp
└── index.html

On Windows, the command npx cpy-cli dist-tmp/** dist/ results in:

dist
└── index.html

On Linux, the same command npx cpy-cli dist-tmp/** dist/ results in:

dist
└── dist-tmp
    └── index.html

It happened using node 18.18.0 on both systems

@yukha-dw
Copy link

yukha-dw commented Mar 6, 2024

Using this command should give same results cpy dist-tmp/**/* dist/

dist
└── index.html

@adrien-febvay
Copy link
Author

Using this command should give same results cpy dist-tmp/**/* dist/

No, it results in 'cpy' is not recognized as an internal or external command, operable program or batch file.

One of the point of this package is having a cross-platform solution.

@zhangyahan
Copy link

I also have the same problem

@yukha-dw
Copy link

Using this command should give same results cpy dist-tmp/**/* dist/

No, it results in 'cpy' is not recognized as an internal or external command, operable program or batch file.

One of the point of this package is having a cross-platform solution.

replace cpy with npx cpy-cli if executed directly

@adrien-febvay
Copy link
Author

adrien-febvay commented Apr 18, 2024

replace cpy with npx cpy-cli if executed directly

The point of this thread is that npx cpy-cli has an inconsistent behaviour depending on the OS you're on, so your answer telling to use it doesn't make any sense as, once again, it is broken.

Anyway, I just found out that adding /* to the source fixes my issue.

Scratch my last. The workaround didn't work.

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

No branches or pull requests

3 participants