Skip to content

Commit

Permalink
Address /dist folder bug
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwal-pai77 committed Apr 3, 2024
1 parent a665c79 commit b5cbac2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/copy_secrets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ async function main() {
try {
// Copy binding file to local directory so it's included in VSCE package
console.log('Copying secrets to dist');
await fsp.copyFile('./src/config.json', './dist/config.json');
await fsp.mkdir('./dist', { recursive: true }).then(() => fsp.copyFile('./src/config.json', './dist/config.json'));
} catch (err) {
console.log(err);
}
Expand Down
5 changes: 4 additions & 1 deletion src/handlers/handleCLIDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ class DependenciesDownloader {
if (shell == undefined) {
return;
}
// Checks if CB shell is installed and requires update by comparing current version of tool with version config value
if (
this.isInstalled(toolsPath, shell, CBToolsType.SHELL) &&
(
Expand All @@ -309,6 +310,7 @@ class DependenciesDownloader {
if (cbimport_export == undefined) {
return;
}
// Checks if CB Import/Export is installed and requires update by comparing current version of tool with version config value
if (this.isInstalled(toolsPath, cbimport_export, CBToolsType.CB_EXPORT) && (DependenciesUtil.CBIMPORT_EXPORT_VERSION !== DependenciesUtil.getPropertyValue(extensionPath, DependenciesUtil.CBIMPORT_EXPORT_KEY))) {
logger.info("A new version of Couchbase CB Import/Export is available. Removing local version and downloading the new one");
DependenciesUtil.deleteFolder(
Expand All @@ -319,6 +321,7 @@ class DependenciesDownloader {
if (cbMigrate == undefined) {
return;
}
// Checks if CB Migrate is installed and requires update by comparing current version of tool with version config value
if (this.isInstalled(toolsPath, cbMigrate, CBToolsType.CB_MIGRATE) && (DependenciesUtil.CBMIGRATE_VERSION !== DependenciesUtil.getPropertyValue(extensionPath, DependenciesUtil.CBMIGRATE_KEY))) {
logger.info("A new version of Couchbase CBMigrate is available. Removing local version and downloading the new one");
DependenciesUtil.deleteFolder(
Expand All @@ -333,8 +336,8 @@ class DependenciesDownloader {
"..",
"cb-vscode-extension"
);
DependenciesUtil.createVersioningFile(extensionPath);
createFolder(extensionPath);
DependenciesUtil.createVersioningFile(extensionPath);
const toolsPath = path.join(extensionPath, "tools");
createFolder(toolsPath);
const osArch = OSUtil.getOSArch();
Expand Down

0 comments on commit b5cbac2

Please sign in to comment.