mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
63f3a834cc
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
31 lines
679 B
TypeScript
Executable File
31 lines
679 B
TypeScript
Executable File
#!/usr/bin/env -S npx tsx
|
|
|
|
/*
|
|
* Checks for the presence of a webapp, inspects its version and prints it
|
|
*/
|
|
|
|
import url from "node:url";
|
|
|
|
import { versionFromAsar } from "./set-version.js";
|
|
|
|
async function main(): Promise<number> {
|
|
const version = await versionFromAsar();
|
|
console.log(version);
|
|
|
|
return 0;
|
|
}
|
|
|
|
if (import.meta.url.startsWith("file:")) {
|
|
const modulePath = url.fileURLToPath(import.meta.url);
|
|
if (process.argv[1] === modulePath) {
|
|
main()
|
|
.then((ret) => {
|
|
process.exit(ret);
|
|
})
|
|
.catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|
|
}
|
|
}
|