Skip to content

Commit

Permalink
fix getting version from cli arg with yargs after the Electron 28 bump (
Browse files Browse the repository at this point in the history
#1058)

* fix getting version from cli arg with yargs after the Electron 28 bump

* bump version to 1.4.2
  • Loading branch information
lilyinstarlight authored Jan 8, 2024
1 parent 43ee13e commit dde7672
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/appConfiguration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class AppConfiguration {
/**
* @param {string} configPath
*/
constructor(configPath) {
constructor(configPath, appVersion) {
_AppConfiguration_configPath.set(this, configPath);
_AppConfiguration_startupConfig.set(this, require('../config')(configPath));
_AppConfiguration_startupConfig.set(this, require('../config')(configPath, appVersion));
_AppConfiguration_legacyConfigStore.set(this, new Store({
name: 'config'
}));
Expand Down
3 changes: 2 additions & 1 deletion app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ function getConfigFile(configPath) {
}
}

function argv(configPath) {
function argv(configPath, appVersion) {
let configFile = getConfigFile(configPath);
const missingConfig = configFile == null;
configFile = configFile || {};
let config = yargs
.env(true)
.config(configFile)
.version(appVersion)
.options({
appActiveCheckInterval: {
default: 2,
Expand Down
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (app.commandLine.hasSwitch('customUserDir')) {
}

const { AppConfiguration } = require('./appConfiguration');
const appConfig = new AppConfiguration(app.getPath('userData'));
const appConfig = new AppConfiguration(app.getPath('userData'), app.getVersion());

const config = appConfig.startupConfig;
config.appPath = path.join(__dirname, isDev ? '' : '../../');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.4.1",
"version": "1.4.2",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit dde7672

Please sign in to comment.