Skip to content

Commit fdff192

Browse files
committed
Add support for install path
1 parent 8df49a1 commit fdff192

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ A buildpack to install the Playwright Chromium executable ONLY.
1212
# Customization
1313
By default, this will install the necessary exe into a folder called `/browsers` under the build directory (the directory where the root script lives).
1414

15+
To change the this folder's name, override the `INSTALL_PATH` environmental variable.
16+
1517
# Notes
1618
This was developed for usage with `playwright-python` in mind so support for other languages is unknown.
1719

bin/compile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ if [ -z "$INSTALL_PATH" ]; then
1010
INSTALL_PATH="/browsers"
1111
fi
1212

13-
echo "Install path is $INSTALL_PATH"
14-
export PLAYWRIGHT_BROWSERS_PATH=$BUILD_DIR/browsers
15-
playwright install chromium
13+
export PLAYWRIGHT_BROWSERS_PATH=$BUILD_DIR/$INSTALL_PATH
14+
echo "-----> Install path is $INSTALL_PATH"
15+
echo "-----> Browsers will be installed in $PLAYWRIGHT_BROWSERS_PATH"
16+
playwright install chromium
17+
echo "-----> Installation done"

0 commit comments

Comments
 (0)