From 80b4843d3032e22f7bb9f96997066c80312ec844 Mon Sep 17 00:00:00 2001 From: agorangetek Date: Wed, 30 Sep 2026 10:11:45 +0300 Subject: [PATCH] Use -o rather than the undocumented --executable on Linux/macOS PureBasic's own reference documents the output switch as "-o, --output, /OUTPUT " and the Windows example uses /EXE, but "--executable" appears nowhere: not in `pbcompiler -h` and not in the manual. It is accepted by 6.41 and does honour the path, so this is not a live bug -- it is an undocumented alias with nothing promising it on other versions. -o is the same switch in its documented short form, so the non-Windows branch now uses it. The /EXE choice for Windows is unchanged and matches the manual's Windows example. --- src/compilerService.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compilerService.ts b/src/compilerService.ts index 1cdf28a..35bc7c2 100644 --- a/src/compilerService.ts +++ b/src/compilerService.ts @@ -33,9 +33,11 @@ export class CompilerService { const extraArgs = cfg.get('compilerArgs', []); const outputFile = this.getOutputPath(filePath); // The Windows compilers (pbcompiler.exe / pbcompilerc.exe) use "/EXE", - // while Linux/macOS use "--executable". Neither has a "run" switch, so the - // executable is launched separately after a successful compile. - const exeSwitch = process.platform === 'win32' ? '/EXE' : '--executable'; + // while Linux/macOS take "-o" (documented as "--output"). "--executable" is + // an undocumented alias that happens to work on 6.41, so it is not used + // here. Neither has a "run" switch, so the executable is launched + // separately after a successful compile. + const exeSwitch = process.platform === 'win32' ? '/EXE' : '-o'; const args: string[] = [filePath, exeSwitch, outputFile, ...extraArgs]; this.outputChannel.clear();