Working in node, I have a bash script that acts as glue for my build and deployment process. It calls npm, gulp, the AWS cli, and docker as well as a number of standard command-line tools (sed, grep, export, etc.) Many of those tools call other processes as well (babel and typescript, for example.
When I run this script manually, I see a ton of output in the console. When I automate the same script and try to output the results to a log file, a lot of what I saw in the console never appears.
The command I'm currently running looks like this:
NODE_ENV=sandbox ./bapc.sh >> /var/log/bapc.log 2>&1
How can I call the script so that everything winds up in the log file?