Skip to content

Commit abf1699

Browse files
committed
updat esome
1 parent a77e97a commit abf1699

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Util/PhpDevServe.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,25 @@ public function __construct(string $serveAddr, string $docRoot, string $entryFil
121121

122122
/**
123123
* @param string $hceFile
124+
* @param bool $mustLoad
125+
*
126+
* @return bool
124127
*/
125-
public function loadHceFile(string $hceFile): void
128+
public function loadHceFile(string $hceFile, bool $mustLoad = false): bool
126129
{
127130
if (!file_exists($hceFile)) {
128-
throw new RuntimeException('the IDEA http-client env json file not exists. file: ' . $hceFile);
131+
if ($mustLoad) {
132+
throw new RuntimeException('the http-client env json file not exists. file: ' . $hceFile);
133+
}
134+
135+
return false;
129136
}
130137

131138
$jsonString = file_get_contents($hceFile);
132139

133140
// load data
134141
$this->hceData = Json::decode($jsonString, true);
142+
return true;
135143
}
136144

137145
/**
@@ -233,6 +241,7 @@ public function getInfo(): array
233241
'serverAddr' => $this->getServerAddr(),
234242
'documentRoot' => $this->docRoot,
235243
'entryFile' => $this->getEntryFile(),
244+
'commandLine' => $this->getCommand(false),
236245
];
237246
}
238247

0 commit comments

Comments
 (0)