Merge pull request 'Avoid a few cases of chmod-after-creation' (#3438) from tangential/clan-core:it-s_a_race into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3438
This commit is contained in:
Mic92
2025-05-04 07:08:43 +00:00
3 changed files with 17 additions and 11 deletions

View File

@@ -26,8 +26,7 @@ writeShellScriptBin "deploy-docs" ''
trap "rm -rf $tmpdir" EXIT
if [ -n "''${SSH_HOMEPAGE_KEY-}" ]; then
echo "$SSH_HOMEPAGE_KEY" > "$tmpdir/ssh_key"
chmod 600 "$tmpdir/ssh_key"
( umask 0177 && echo "$SSH_HOMEPAGE_KEY" > "$tmpdir/ssh_key" )
sshExtraArgs="-i $tmpdir/ssh_key"
else
sshExtraArgs=