fixes PHP version parse even when it has warnings

address to issue https://github.com/felixfbecker/php-language-server/issues/237
pull/46/head
Herbert Pimentel 2017-01-11 09:16:19 -03:00 committed by GitHub
parent 0062a5c814
commit 54440c4005
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
} }
// Parse version and discard OS info like 7.0.8--0ubuntu0.16.04.2 // Parse version and discard OS info like 7.0.8--0ubuntu0.16.04.2
const match = stdout.match(/^PHP ([^\s]+)/); const match = stdout.match(/PHP ([^\s]+[\d]+)/);
if (!match) { if (!match) {
vscode.window.showErrorMessage('Error parsing PHP version. Please check the output of php --version'); vscode.window.showErrorMessage('Error parsing PHP version. Please check the output of php --version');
return; return;