mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Don't fail build with vsix directory exists (#5593)
* Don't fail build with vsix directory exists * Add a !fs.exists call prior to mkdir
This commit is contained in:
@@ -41,7 +41,15 @@ function packageBuiltInExtensions() {
|
|||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
||||||
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
||||||
fs.mkdirSync(visxDirectory);
|
try {
|
||||||
|
if (!fs.existsSync(visxDirectory)) {
|
||||||
|
fs.mkdirSync(visxDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
// don't fail the build if the output directory already exists
|
||||||
|
console.warn(err);
|
||||||
|
}
|
||||||
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
||||||
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
||||||
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
||||||
|
|||||||
@@ -44,7 +44,14 @@ export function packageBuiltInExtensions() {
|
|||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
||||||
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
||||||
fs.mkdirSync(visxDirectory);
|
try {
|
||||||
|
if (!fs.existsSync(visxDirectory)) {
|
||||||
|
fs.mkdirSync(visxDirectory);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// don't fail the build if the output directory already exists
|
||||||
|
console.warn(err);
|
||||||
|
}
|
||||||
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
||||||
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
||||||
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
||||||
|
|||||||
Reference in New Issue
Block a user