Skip to content

Commit

Permalink
🐛 properly fetch the pathToSync setting
Browse files Browse the repository at this point in the history
should fix #127, and save a cat...
  • Loading branch information
stef-levesque committed Nov 15, 2018
1 parent 9190952 commit 1902090
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/scm/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,9 @@ export class Model implements Disposable {
}

private async syncUpdate(): Promise<void> {
//const config: IPerforceConfig = PerforceService.getConfig();
const config = this._config;
const pathToSync = config.p4Dir ? config.p4Dir + '...' : null;

await Utils.runCommand(this._workspaceUri, 'sync', Uri.parse(pathToSync), null, '-q').then(output => {
const p4Dir = vscode.workspace.getConfiguration('perforce', this._workspaceUri).get('dir');
const pathToSync = p4Dir ? vscode.Uri.file(p4Dir + '...') : null;
Utils.runCommand(this._workspaceUri, 'sync', pathToSync, null, '').then(output => {
Display.channel.append(output);
this.Refresh();
}).catch(reason => {
Expand Down

0 comments on commit 1902090

Please sign in to comment.