Skip to content

Commit 658fecc

Browse files
authored
fix: replace grep -P with grep -E + sed for macOS compatibility in sync-compat.sh (#49127)
1 parent 8d2a61d commit 658fecc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/sync-compat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for arg in "$@"; do
3333
done
3434

3535
# Extract DefaultCopilotVersion from Go constants file
36-
COPILOT_VERSION=$(grep -oP '^\s*const DefaultCopilotVersion\s+Version\s*=\s*"\K[^"]+' "$CONSTANTS_FILE")
36+
COPILOT_VERSION=$(grep -E '^\s*const DefaultCopilotVersion' "$CONSTANTS_FILE" | sed -E 's/.*"([^"]+)".*/\1/')
3737
if [ -z "$COPILOT_VERSION" ]; then
3838
echo "Error: could not extract DefaultCopilotVersion from $CONSTANTS_FILE" >&2
3939
exit 1

0 commit comments

Comments
 (0)