Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 6f0dfca

Browse files
authored
Remove the use of PHPWarningSuppressor (#2)
This type was removed from the HSL.
1 parent f47f1a4 commit 6f0dfca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/InspectorCLI.hack

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ namespace Facebook\HHASTInspect;
1212
use namespace Facebook\HHAST;
1313
use namespace HH\Lib\{C, Dict, Str, Vec};
1414
use type Facebook\CLILib\CLIWithRequiredArguments;
15-
use type /* HHAST_IGNORE_ERROR[NamespacePrivateLinter] */ HH\Lib\_Private\PHPWarningSuppressor
16-
;
1715
use namespace Facebook\CLILib\CLIOptions;
1816

1917
use namespace /* HHAST_IGNORE_ERROR[UseStatementWithAs] */ Facebook\XHP\Core as x
@@ -112,12 +110,15 @@ final class InspectorCLI extends CLIWithRequiredArguments {
112110
$result = \pcntl_exec('/usr/bin/open', varray[$filename], $env);
113111
break;
114112
case OSFamily::LINUX:
115-
using ($_no_warnings = new PHPWarningSuppressor()) {
113+
$error_reporting = \error_reporting(0);
114+
try {
116115
$result = \pcntl_exec(
117116
'/usr/bin/sensible-browser',
118117
varray[$filename],
119118
$env,
120119
);
120+
} finally {
121+
\error_reporting($error_reporting);
121122
}
122123
if ($result === false) {
123124
$result = \pcntl_exec('/usr/bin/xdg-open', varray[$filename], $env);

0 commit comments

Comments
 (0)