Skip to content

Commit

Permalink
do not preserve generated README's permissions
Browse files Browse the repository at this point in the history
this removes the requirement of having the generated file already
present in the source tree. otherwise, if it does not exist, `cp` will
fail with "Permission denied".

the problem here is that `--no-preserve` is only guaranteed to be available
in `coreutils`, such that really this rule can only be run within
`nix-shell` or non-Nix Linux having `coreutils` installed.
  • Loading branch information
fricklerhandwerk committed Mar 21, 2022
1 parent 3604465 commit 9573bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/docs/copy-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -euo pipefail
# copy files, passed as pairs of source and target locations, to the workspace
# directory the calling rule is run from
while (($#)); do
cp "$1" "$BUILD_WORKSPACE_DIRECTORY/$2"
cp --no-preserve=all "$1" "$BUILD_WORKSPACE_DIRECTORY/$2"
shift; shift
done

0 comments on commit 9573bec

Please sign in to comment.