Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Conversation

@sundevilyang
Copy link

task error

./run ci:test
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file ... target_directory

The --no-clobber option is not available on all versions of cp. To avoid this error, you can replace the cp --no-clobber command with cp -n which should work on most systems.

use the -n option instead of --no-clobber. Note that 2>/dev/null || : has also been added after the cp command to ignore any error messages that might be produced.

task error 
```
./run ci:test
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpsvXx] source_file ... target_directory
```


The `--no-clobber` option is not available on all versions of cp. To avoid this error, you can replace the `cp --no-clobber` command with `cp -n` which should work on most systems.

use the `-n` option instead of `--no-clobber`. Note that `2>/dev/null || :`  has also been added after the cp command to ignore any error messages that might be produced.
@nickjj
Copy link
Owner

nickjj commented May 4, 2023

Hi,

Thanks.

Can you let me know which CI environment you're running where --no-clobber isn't available?

Also in your PR, the -n is missing. The git diff changes cp --no-clobber .env.example .env to cp .env.example .env 2>/dev/null || :.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants