echo 1 > a && ls -l a
# -rw-rw-r-- 1 admin admin 2 Aug 24 18:29 a
node -e "fs.writeFileSync('./a', 'echo world', {mode: 0o755})" && ls -l a
# -rw-rw-r-- 1 admin admin 10 Aug 24 18:29 a
./a
# bash: ./a: Permission denied
Even we specify the mode to be 0o755, fs.writeFileSync still doesn't change to file mode which is 0o644.
So the installer which uses fs.writeFileSync L63 won't make esbuild executable.
This is a default behavior on POSIX when trying to write Buffer to an existing file.
PR#1547 shall fix it.