Skip to content

Commit 9abeaac

Browse files
author
Jeff W
committed
Added quotes around format-commands to prevent space errors.
1 parent 4339099 commit 9abeaac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/client/formatters/autoPep8Formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export class AutoPep8Formatter extends BaseFormatter {
1919
public formatDocument(document: vscode.TextDocument, options: vscode.FormattingOptions, token: vscode.CancellationToken): Thenable<vscode.TextEdit[]> {
2020
var autopep8Path = this.pythonSettings.formatting.autopep8Path;
2121
var fileDir = path.dirname(document.uri.fsPath);
22-
return super.provideDocumentFormattingEdits(document, options, token, `${autopep8Path} ${document.uri.fsPath}`);
22+
return super.provideDocumentFormattingEdits(document, options, token, `${autopep8Path} "${document.uri.fsPath}"`);
2323
}
2424
}

src/client/formatters/yapfFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export class YapfFormatter extends BaseFormatter {
1919
public formatDocument(document: vscode.TextDocument, options: vscode.FormattingOptions, token: vscode.CancellationToken): Thenable<vscode.TextEdit[]> {
2020
var yapfPath = this.pythonSettings.formatting.yapfPath;
2121
var fileDir = path.dirname(document.uri.fsPath);
22-
return super.provideDocumentFormattingEdits(document, options, token, `${yapfPath} ${document.uri.fsPath}`);
22+
return super.provideDocumentFormattingEdits(document, options, token, `${yapfPath} "${document.uri.fsPath}"`);
2323
}
2424
}

0 commit comments

Comments
 (0)