Skip to content

Commit ffa5643

Browse files
committed
add some error handling
1 parent d248af6 commit ffa5643

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/validate-plugin-version.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ main(){
1414
echo "Plugin path: $PLUGIN_PATH"
1515
fi
1616

17+
ls -la $PLUGIN_PATH
18+
19+
# Check if the plugin path exists.
20+
if [[ ! -d "${PLUGIN_PATH}" ]]; then
21+
echo "Plugin path does not exist."
22+
exit 1
23+
fi
24+
1725
local CURRENT_WP_VERSION
1826
CURRENT_WP_VERSION=$(curl -s https://api.wordpress.org/core/version-check/1.7/ | jq -r '.offers[0].current')
1927
echo "Current WordPress Version: ${CURRENT_WP_VERSION}"

0 commit comments

Comments
 (0)