Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Add shell check to pre-cmmit hooks & fix issues reported by it (#2579)
Asher Foad09c1c865cd2
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex e2ff239a6..aa04ccd99 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -97,3 +97,8 @@ repos:entry: ./run_alembic_check.shlanguage: scriptstages: [ manual ]+ - repo: https://github.com/koalaman/shellcheck-precommit+ rev: v0.10.0+ hooks:+ - id: shellcheck+diff --git a/entrypoint-skyvern.sh b/entrypoint-skyvern.shindex 7ab0caa8f..d0eb8ba06 100644--- a/entrypoint-skyvern.sh+++ b/entrypoint-skyvern.sh@@ -1,4 +1,3 @@-#!/bin/bashset -ediff --git a/entrypoint-skyvernui.sh b/entrypoint-skyvernui.shindex 348ed9a1a..d4225e399 100644--- a/entrypoint-skyvernui.sh+++ b/entrypoint-skyvernui.sh@@ -1,11 +1,10 @@-#!/bin/bashset -e# setting api key-export VITE_SKYVERN_API_KEY=$(sed -n 's/.*cred\s*=\s*"\([^"]*\)".*/\1/p' .streamlit/secrets.toml)-+VITE_SKYVERN_API_KEY=$(sed -n 's/.*cred\s*=\s*"\([^"]*\)".*/\1/p' .streamlit/secrets.toml)+export VITE_SKYVERN_API_KEYnpm run startdiff --git a/run_alembic_check.sh b/run_alembic_check.shindex 83e05c9f8..f5cc53772 100755--- a/run_alembic_check.sh+++ b/run_alembic_check.sh@@ -1,6 +1,6 @@#!/bin/sh# first apply migrations-export PATH=$PATH:.venv/bin+export PATH="${PATH}:.venv/bin"alembic upgrade head# then check if the database is up to date with the modelsalembic checkdiff --git a/run_skyvern.sh b/run_skyvern.shindex fe20dac45..1295705c5 100755--- a/run_skyvern.sh+++ b/run_skyvern.sh@@ -1,14 +1,15 @@#!/bin/bashpid=$(lsof -t -i :8000)-if [ ! -z "$pid" ]; then- kill $pid+if [ -n "$pid" ]; then+ kill "$pid"fiif [ ! -f .env ]; thencp .env.example .envecho "Please add your api keys to the .env file."fi+# shellcheck source=/dev/nullsource "$(poetry env info --path)/bin/activate"poetry install./run_alembic_check.shdiff --git a/run_ui.sh b/run_ui.shindex 267cb220b..d4942cea8 100755--- a/run_ui.sh+++ b/run_ui.sh@@ -1,11 +1,11 @@#!/bin/bashpid=$(lsof -t -i :8080)-if [ ! -z "$pid" ]; then- kill $pid+if [ -n "$pid" ]; then+ kill "$pid"fi-cd skyvern-frontend+cd skyvern-frontend || exit 1if [ ! -f .env ]; thencp .env.example .env