Skip to content

install: implement --no-target-directory, -T #4066

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

Closed
bruecke opened this issue Oct 20, 2022 · 2 comments
Closed

install: implement --no-target-directory, -T #4066

bruecke opened this issue Oct 20, 2022 · 2 comments

Comments

@bruecke
Copy link
Contributor

bruecke commented Oct 20, 2022

The install command does not support --no-target-directory, -T yet.

@bruecke
Copy link
Contributor Author

bruecke commented Oct 20, 2022

Since I've been working #3814 lately, I'd like to implement this option as well.

I've already started to derive some test cases from the original GNU install, to understand what has to be done:

#export C=coreutils/target/debug/

rm -rf dir* no-dir* file*
mkdir -p dir1 dir3
touch file file2

${C}install -T file dir1            # fails w/ "cannot overwrite directory 'dir1' with non-directory"
${C}install -T dir1 dir3            # fails w/ "omitting directory 'dir1'"
${C}install -TD file dir1/file/     # fails w/ "cannot create regular file 'dir1/file/': Not a directory"
${C}install -T file -t dir1         # fails w/ "cannot combine --target-directory (-t) and --no-target-directory (-T)"
${C}install -T file -t              # fails and prints usage
${C}install -T file file2 dir1      # fails w/ "extra operand 'dir1'", then prints usage
${C}install -T file file2 dir1 dir3 # fails w/ "extra operand 'dir1'", then prints usage
${C}install -T file dir3/file       # pass

@cakebaker
Copy link
Contributor

Fixed in #7867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants