Implement a no sync rule (#7216)

* implement a no sync rule

* fix linting disable

* fix unused imports

* exclude more testing

* clean up fs usage

* clean up more fs usage

* remove duplicate of code

* fix compile errors
This commit is contained in:
Anthony Dresser
2019-09-17 13:32:42 -07:00
committed by GitHub
parent 4d62983680
commit 28d453fced
31 changed files with 305 additions and 201 deletions

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import * as glob from 'glob';
import * as utils from '../common/utils';
@@ -92,7 +91,7 @@ export class PythonPathLookup {
const cmd = `"${options.command}" ${args.join(' ')}`;
let output = await utils.executeBufferedCommand(cmd, {});
let value = output ? output.trim() : '';
if (value.length > 0 && fs.existsSync(value)) {
if (value.length > 0 && await utils.exists(value)) {
return value;
}
} catch (err) {
@@ -163,4 +162,4 @@ export class PythonPathLookup {
}
return undefined;
}
}
}