Delay and wait for loadConfigs() after logging version info

pull/373/head
Kelvin Schoofs 3 years ago
parent cac0ec2fcc
commit 8c8b95016a

@ -8,6 +8,8 @@
### Changes
- Small improvements to Dropdown(WithInput) UI components
- Delay and wait for loadConfigs() after logging version info
- This solves a small issue/annoyance where logs regarding loading logs appear before the version logging
### Development changes
- Added `semver` as dependency in preparation of `FS_NOTIFY_ERRORS` flag

@ -342,7 +342,6 @@ vscode.workspace.onDidChangeConfiguration(async (e) => {
// if (!e.affectsConfiguration('sshfs.configs')) return;
return loadConfigs();
});
loadConfigs();
function parseFlagList(list: string[] | undefined, origin: string): Record<string, FlagCombo> {
if (list === undefined) return {};

@ -26,8 +26,9 @@ interface CommandHandler {
handleTerminal?(terminal: SSHPseudoTerminal): void;
}
export function activate(context: vscode.ExtensionContext) {
export async function activate(context: vscode.ExtensionContext) {
Logging.info`Extension activated, version ${getVersion()}, mode ${context.extensionMode}`;
Logging.debug`Running VS Code version ${vscode.version} ${process.versions}`;
setDebug(process.env.VSCODE_SSHFS_DEBUG?.toLowerCase() === 'true');
@ -46,6 +47,11 @@ export function activate(context: vscode.ExtensionContext) {
// I really don't like having to pass context to *everything*, so let's do it this way
setAsAbsolutePath(context.asAbsolutePath.bind(context));
// Start loading the configs (asynchronously)
try { await loadConfigs() } catch (e) {
Logging.error`Could not load configs: ${e}`;
}
const manager = new Manager(context);
const subscribe = context.subscriptions.push.bind(context.subscriptions) as typeof context.subscriptions.push;

Loading…
Cancel
Save