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

No overwrite option #1

Open
manticorp opened this issue Mar 15, 2024 · 1 comment
Open

No overwrite option #1

manticorp opened this issue Mar 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@manticorp
Copy link

Please make an option to not overwrite a file if it exists!

For example:

copy-file --overwrite false src.txt dest.txt

and if dest.txt exists, it will not overwrite it.

Use case is for a post-install script that populates some default files for an application, but don't want to overwrite those files once the end user has already written data to those files.

@dpilafian dpilafian added the enhancement New feature or request label Mar 16, 2024
dpilafian added a commit that referenced this issue Mar 17, 2024
@dpilafian
Copy link
Member

When the --no-overwrite flag is used and the target file already exists, a "skip" message similar to the following will be displayed:

[10:52:42] copy-file build/app.js → dist/app.js (1ms, skip -- target exists)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants