Skip to content

Commit e12d5e3

Browse files
committed
Report cases where we can't find *any* terminal on the system
This should only happen in extreme environments (perhaps Linux with no common terminal emulators installed whatsoever), or notably on OSX if Spotlight is disabled. Reporting this will let us check if that case is common, and help decide if it's worth investigating it further.
1 parent 0e22875 commit e12d5e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interceptors/terminal/fresh-terminal-interceptor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ export class TerminalInterceptor implements Interceptor {
368368
constructor(private config: HtkConfig) { }
369369

370370
async isActivable(): Promise<boolean> {
371-
return !!(await getTerminalCommand());
371+
const terminalAvailable = !!(await getTerminalCommand());
372+
if (!terminalAvailable) reportError('No terminal could be detected');
373+
return terminalAvailable;
372374
}
373375

374376
isActive(proxyPort: number | string): boolean {

0 commit comments

Comments
 (0)