Skip to content

Commit 8b1b8b1

Browse files
committed
Return early if serverPath is not set
or path.basename(serverPath) will failed Happen if we could not download tool4D
1 parent 32cdd73 commit 8b1b8b1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

editor/src/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ export class Config {
115115
get serverPath() {
116116
let serverPath = this._serverPath;
117117

118+
// Return early if serverPath is not set
119+
if (!serverPath) {
120+
return serverPath;
121+
}
122+
118123
const type = os.type();
119124
const dirname = path.basename(serverPath);
120125
if (type === "Darwin" && dirname.endsWith(".app")) {

editor/src/infoplist.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export class InfoPlistManager {
1616

1717
private static _getInfoplistPath(inExePath : string) {
1818
const serverPath = inExePath;
19+
20+
// Return early if serverPath is not set
21+
if (!serverPath) {
22+
return "";
23+
}
24+
1925
const type = os.type();
2026
const dirname = path.basename(serverPath);
2127
if (type === "Darwin" && dirname.endsWith(".app")) {

0 commit comments

Comments
 (0)