I have this:
npm install "$tgz_path" &>> "$HOME/.r2g/logs/r2g.log";
but that is syntactically incorrect. How do I append stdout+stderr to that log file?
That syntax is valid in bash. From man bash:
The format for appending standard output and standard error is:
&>>word
A more basic way to write it (that works in more shells) will be:
$ npm install "$tgz_path" >>word 2>&1 "$HOME/.r2g/logs/r2g.log";