mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Add sql proj schema compare for dacpac (#10388)
* add support for schema compare to specify source dacpac * add build and dacpac produced from build * check if dacpac exists * add tests * move exists check code to utils * fix test run failing
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as os from 'os';
|
||||
import { promises as fs } from 'fs';
|
||||
|
||||
/**
|
||||
* Consolidates on the error message string
|
||||
*/
|
||||
@@ -74,3 +76,15 @@ export function getSafeNonWindowsPath(filePath: string): string {
|
||||
filePath = filePath.split('\\').join('/').split('"').join('');
|
||||
return '"' + filePath + '"';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the folder or file exists @param path path of the folder/file
|
||||
*/
|
||||
export async function exists(path: string): Promise<boolean> {
|
||||
try {
|
||||
await fs.access(path);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user