We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19ff44e commit 352dd38Copy full SHA for 352dd38
src/HCLParser.php
@@ -22,12 +22,26 @@ public function __construct($hcl)
22
$this->hcl = $hcl;
23
}
24
25
+ /**
26
+ * @return string
27
+ */
28
+ private function getBinaryPath()
29
+ {
30
+ $binaryPath = __DIR__.'/../bin/'.Installer::getBinaryFilename();
31
+
32
+ if (!file_exists($binaryPath)) {
33
+ Installer::installBinaries();
34
+ }
35
36
+ return $binaryPath;
37
38
39
/**
40
* @return string
41
*/
42
private function getJSONString()
43
{
- $command = __DIR__.'/../bin/'.Installer::getBinaryFilename().' --reverse <<\'EOF\''.PHP_EOL.$this->hcl.PHP_EOL.'EOF';
44
+ $command = $this->getBinaryPath().' --reverse <<\'EOF\''.PHP_EOL.$this->hcl.PHP_EOL.'EOF';
45
46
exec($command, $lines);
47
0 commit comments