Skip to content
Snippets Groups Projects
Commit 745644cd authored by SeeBasTStick's avatar SeeBasTStick
Browse files

server now create a tmp folder to dump errors from prob

parent b079e357
No related branches found
No related tags found
No related merge requests found
...@@ -166,10 +166,16 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { ...@@ -166,10 +166,16 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
let documentPath: path.ParsedPath = path.parse(URI.parse(textDocument.uri).path); let documentPath: path.ParsedPath = path.parse(URI.parse(textDocument.uri).path);
let errorPath: string = documentPath.dir + '/_error.json' let errorDic : string = documentPath.dir + '/tmp'
let errorPath: string = errorDic + '/_error.json'
const { exec } = require('child_process'); const { exec } = require('child_process');
if (!fs.existsSync(errorDic)){
fs.mkdirSync(errorDic);
}
fs.writeFile(errorPath, "", () => { }) //Insure a clean error file fs.writeFile(errorPath, "", () => { }) //Insure a clean error file
let command: string = getCommand(URI.parse(textDocument.uri).path, errorPath, settings) let command: string = getCommand(URI.parse(textDocument.uri).path, errorPath, settings)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment