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

Call cp(1) relative to PATH #205

Merged
merged 1 commit into from
Jan 6, 2022
Merged

Call cp(1) relative to PATH #205

merged 1 commit into from
Jan 6, 2022

Conversation

veehaitch
Copy link
Contributor

In contrast to other coreutils binaries used throughout the code,
cp(1) gets called with an absolute path which assumes the binary
resides in /bin. This commit removes the absolute path to search
for cp(1) relative to the search paths given in the PATH
environment variable.

Using an absolute path to call binaries is incompatible with
distributions which do not follow the Filesystem Hierachy Standard;
NixOS is an example. Also, as other coreutils binaries merely mention
the binary's name, it is more consistent to call cp(1) in the same way.

Signed-off-by: Vincent Haupert mail@vincent-haupert.de

In contrast to other coreutils binaries used throughout the code,
cp(1) gets called with an absolute path which assumes the binary
resides in `/bin`. This commit removes the absolute path to search
for cp(1) relative to the search paths given in the `PATH`
environment variable.

Using an absolute path to call binaries is incompatible with
distributions which do not follow the Filesystem Hierachy Standard;
NixOS is an example. Also, as other coreutils binaries merely mention
the binary's name, it is more consistent to call cp(1) in the same way.

Signed-off-by: Vincent Haupert <mail@vincent-haupert.de>
@veehaitch
Copy link
Contributor Author

Please let me know if there's anything I can do to get this PR merged, @llly @lzha101 🙂

@lzha101 lzha101 merged commit b6d6145 into intel:master Jan 6, 2022
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

Successfully merging this pull request may close these issues.

2 participants