Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Composer/packages/server/src/models/bot/botProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const oauthInput = () => ({

const defaultLanguage = 'en-us'; // default value for settings.defaultLanguage

const isUsingAdaptiveRuntime = (runtime?: DialogSetting['runtime']): boolean =>
runtime?.key === 'csharp-azurewebapp-v2' || runtime?.key === 'adaptive-runtime-dotnet-webapp';
export class BotProject implements IBotProject {
public ref: LocationRef;
// TODO: address need to instantiate id - perhaps do so in constructor based on Store.get(projectLocationMap)
Expand Down Expand Up @@ -200,8 +202,11 @@ export class BotProject implements IBotProject {
*/
public getRuntimePath = (): string | undefined => {
let runtimePath = this.settings?.runtime?.path;

if (runtimePath && !Path.isAbsolute(runtimePath)) {
runtimePath = Path.resolve(this.dir, 'settings', runtimePath);
const dir = isUsingAdaptiveRuntime(this.settings?.runtime) ? Path.resolve(this.dir, 'settings') : this.dir;

runtimePath = Path.resolve(dir, runtimePath);
}
return runtimePath;
};
Expand Down
2 changes: 1 addition & 1 deletion extensions/runtimes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default async (composer: any): Promise<void> => {
await copyDir(schemaSrcPath, localDisk, schemaDstPath, project.fileStorage, pathsToExclude);
const schemaFolderInRuntime = path.join(destPath, 'azurewebapp/Schemas');
await removeDirAndFiles(schemaFolderInRuntime);
return path.relative(path.join(project.dir, 'settings'), destPath);
return path.relative(project.dir, destPath);
}
throw new Error(`Runtime already exists at ${destPath}`);
},
Expand Down