Skip to content

Commit

Permalink
Sets stagingDir properly in DebugConfigurationProvider (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron authored Jan 28, 2024
1 parent 3d0b93b commit b2289ca
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/DebugConfigurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio
// merge user and workspace settings into the config
result = this.processUserWorkspaceSettings(config);

//force a specific staging folder path because sometimes this conflicts with bsconfig.json
result.stagingFolderPath = path.join('${outDir}/.roku-deploy-staging');
//force a specific stagingDir because sometimes this conflicts with bsconfig.json
result.stagingDir = path.join('${outDir}/.roku-deploy-staging');
result.stagingFolderPath = result.stagingDir;

result = await this.sanitizeConfiguration(result, folder);
result = await this.processEnvFile(folder, result);
Expand Down Expand Up @@ -364,6 +365,14 @@ export class BrightScriptDebugConfigurationProvider implements DebugConfiguratio
config.stagingFolderPath = path.normalize(config.stagingFolderPath.replace('${workspaceFolder}', folderUri.fsPath));
}

if (config.stagingDir.includes('${outDir}')) {
config.stagingDir = path.normalize(config.stagingDir.replace('${outDir}', config.outDir));
}
if (config.stagingDir.includes('${workspaceFolder}')) {
config.stagingDir = path.normalize(config.stagingDir.replace('${workspaceFolder}', folderUri.fsPath));
}


// Make sure that directory paths end in a trailing slash
if (config.debugRootDir) {
config.debugRootDir = this.util.ensureTrailingSlash(config.debugRootDir);
Expand Down

0 comments on commit b2289ca

Please sign in to comment.