Skip to content

Commit 5fd88c3

Browse files
committed
fix: fixes #348 - version information in the about page
Signed-off-by: Pawel Psztyc <[email protected]>
1 parent 607adec commit 5fd88c3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/io/start.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ export default async function start(startTime) {
7878
app.commandLine.appendSwitch('enable-experimental-web-platform-features');
7979
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors');
8080

81+
// Sets the application version in a global variable so the renderer process
82+
// has this information without querying for it.
83+
process.env.ARC_VERSION = app.getVersion();
84+
8185
process.on('uncaughtException', (error) => {
8286
if (error.message) {
8387
logger.error(error.message);

src/preload/arc-preload.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { GoogleDriveProxy } from './GoogleDriveProxy.js';
1717
import { GoogleAnalytics } from './GoogleAnalytics.js';
1818

1919
const env = {};
20-
const APP_VERSION = process.env.npm_package_version;
20+
const APP_VERSION = process.env.ARC_VERSION;
2121
Object.keys(process.env).forEach((key) => {
2222
if (key.indexOf('npm_') === 0 || key.indexOf('ARC_') === 0) {
2323
return;

0 commit comments

Comments
 (0)