mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Print version when run from CLI with --version
or -v
This commit is contained in:
parent
cc6da28032
commit
370c53dac0
@ -565,6 +565,15 @@ process.on("uncaughtException", (error) => {
|
||||
});
|
||||
|
||||
async function appMain() {
|
||||
// Check if the user is requesting the version from the command line, if so, return it and bail out.
|
||||
const args = process.argv;
|
||||
if (args?.length > 1 && (args[1] === "--version" || args[1] === "-v")) {
|
||||
const versionInfo = getWaveVersion();
|
||||
console.log(`Wave Terminal v${versionInfo.version} (build ${versionInfo.buildTime})`);
|
||||
electronApp.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
// Set disableHardwareAcceleration as early as possible, if required.
|
||||
const launchSettings = getLaunchSettings();
|
||||
if (launchSettings?.["window:disablehardwareacceleration"]) {
|
||||
|
Loading…
Reference in New Issue
Block a user