mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Benjin/line endings (#10874)
* dud space * removal of dud space * using OS line separator Co-authored-by: Benjin Dubishar <Benjin@Benjins-MBP.T-mobile.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import * as xmldom from 'xmldom';
|
|||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as utils from '../common/utils';
|
import * as utils from '../common/utils';
|
||||||
import * as xmlFormat from 'xml-formatter';
|
import * as xmlFormat from 'xml-formatter';
|
||||||
|
import * as os from 'os';
|
||||||
|
|
||||||
import { Uri } from 'vscode';
|
import { Uri } from 'vscode';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
@@ -319,7 +320,7 @@ export class Project {
|
|||||||
|
|
||||||
private async serializeToProjFile(projFileContents: any) {
|
private async serializeToProjFile(projFileContents: any) {
|
||||||
let xml = new xmldom.XMLSerializer().serializeToString(projFileContents);
|
let xml = new xmldom.XMLSerializer().serializeToString(projFileContents);
|
||||||
xml = xmlFormat(xml, { collapseContent: true, indentation: ' ' });
|
xml = xmlFormat(xml, <any>{ collapseContent: true, indentation: ' ', lineSeparator: os.EOL }); // TODO: replace <any>
|
||||||
|
|
||||||
await fs.writeFile(this.projectFilePath, xml);
|
await fs.writeFile(this.projectFilePath, xml);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user