heroku / heroku-buildpack-google-chrome

Run (headless) Google Chrome on Heroku
296 stars 365 forks source link

`$1` should be escaped #74

Closed kwlockwo closed 5 years ago

kwlockwo commented 5 years ago
~ $ cat /app/.apt/usr/bin/google-chrome
#!/usr/bin/env bash
if [ $1 = "--version" ]; then
  exec $HOME/.apt/opt/google/chrome/chrome --version
elif [ $1 = "--product-version" ]; then
  exec $HOME/.apt/opt/google/chrome/chrome --product-version
else
  exec $HOME/.apt/opt/google/chrome/chrome --headless --no-sandbox --disable-gpu --remote-debugging-port=9222 $@
fi
~ $ google-chrome --version
Google Chrome 75.0.3770.100 unknown
~ $ google-chrome --product-version
75.0.3770.100