Skip to content

Commit

Permalink
Normalizes slashes
Browse files Browse the repository at this point in the history
Refs: #2680
  • Loading branch information
eamodio committed May 17, 2023
1 parent bd413d9 commit c20ff51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/env/node/git/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ export class Git {
const scope = getLogScope();

const location = await this.getLocation();
const git = location.path ?? 'git';
const git = normalizePath(location.path ?? 'git');

const coreEditorConfig = configuration.get('terminal.overrideGitEditor')
? `-c "core.editor=${getEditorCommand()}" `
Expand Down
3 changes: 2 additions & 1 deletion src/env/node/git/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { join as joinPaths } from 'path';
import * as process from 'process';
import type { CancellationToken } from 'vscode';
import { Logger } from '../../../system/logger';
import { normalizePath } from '../../../system/path';

export const isWindows = process.platform === 'win32';

Expand Down Expand Up @@ -124,7 +125,7 @@ export async function getWindowsShortPath(path: string): Promise<string> {
return;
}

resolve(stdout.trim().replace(/\\/g, '/'));
resolve(normalizePath(stdout.trim()));
});
});
}
Expand Down

0 comments on commit c20ff51

Please sign in to comment.