Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location for config files in Portable VS Code #77

Closed
jgmuchiri opened this issue Feb 5, 2019 · 2 comments
Closed

Location for config files in Portable VS Code #77

jgmuchiri opened this issue Feb 5, 2019 · 2 comments

Comments

@jgmuchiri
Copy link

jgmuchiri commented Feb 5, 2019

For Portable VS Code, Wakatime sets config files in machine's user profile instead of the VS Code data directory. When you open VS Code on a new machine, you have to re-enter the key which is then set in that computer. Currently, the only is to manually move the config files each time you change computer.

In extension.js, this is explicitly specified in line 689 and 193. Expanding these functions to allow for portability would be great.

getWakaHome() {
        let home = process.env.WAKATIME_HOME;
        if (home) {
            return home;
        }
        else {
            return this.getUserHomeDir();
        }
    }
 getUserHomeDir() {
        return process.env[Dependencies.isWindows() ? 'USERPROFILE' : 'HOME'] || '';
    }

Currently, my settings to override this was to edit the above function to set config files to the data/extensions-data inside VS Code portable directory but would obviously be overwritten with update

 getUserHomeDir() {
        return 'data/extensions-data';
    }
@alanhamlett alanhamlett self-assigned this Feb 6, 2019
@gandarez gandarez self-assigned this Apr 15, 2019
@gandarez
Copy link
Member

gandarez commented Apr 15, 2019

There's an open discussion about detecting or not PORTABLE MODE

microsoft/vscode#66029

@gandarez
Copy link
Member

PR #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants