Fix VSCode plugin directory recognition error. (#15)

Fixed pattern matching string in regular expressions
with the goal of correctly recognizing to the plugin directory.
This commit is contained in:
FancyKings 2023-09-07 10:01:28 +08:00 committed by GitHub
parent f7d7a32000
commit 264c3a5941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ if [ ! -d "$EXTENSIONS_DIR" ]; then
exit 1
fi
COPILOT_DIR=$(ls -lt "$EXTENSIONS_DIR" | grep '^d' | awk '{print $9}' | grep -E '^github\.copilot-\d+\.\d+\.\d+$' | head -n 1)
COPILOT_DIR=$(ls -lt "$EXTENSIONS_DIR" | grep '^d' | awk '{print $9}' | grep -E '^github\.copilot-[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
if [ -z "$COPILOT_DIR" ]; then
echo "ERROR: Copilot extension not found!"
exit 1