fix: create header file manually to avoid mode 600
This commit is contained in:
parent
24a42cdb5b
commit
0ca9d1c380
1 changed files with 1 additions and 1 deletions
2
apatch
2
apatch
|
@ -68,7 +68,7 @@ if [ -f "$patchpath" ]; then
|
|||
msg "patch exists, trying to extract existing message"
|
||||
# try to extract the original header from the patch
|
||||
patch_start=$(grep -En '^(diff --git|--- )' "$patchpath" | cut -d: -f1 | head -n 1)
|
||||
header_file="$(mktemp -t apatch.XXXXXX)"
|
||||
header_file="/tmp/$(mktemp -u apatch.XXXXXX)"
|
||||
head -n $(( patch_start - 1 )) "$patchpath" > "$header_file"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue