Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support relative path to runtime #5950

Merged
merged 6 commits into from
Feb 26, 2021
Merged

fix: support relative path to runtime #5950

merged 6 commits into from
Feb 26, 2021

Conversation

benbrown
Copy link
Contributor

Description

  • Remove translation of the runtime relative path to an absolute path
  • Update package manager, local publish and azurePublish to properly handle the relative path when used.

Task Item

Fixes #5786

Replaces #5838

@coveralls
Copy link

coveralls commented Feb 25, 2021

Coverage Status

Coverage increased (+0.005%) to 53.808% when pulling 12d66dc on benbrown/relativepath into beb19b8 on main.

@benbrown
Copy link
Contributor Author

@alanlong9278 can you check this out and double check it for me? I think I've addressed all the spots where the runtime path is used.

@@ -352,7 +351,7 @@ export default async (composer: IExtensionRegistration): Promise<void> => {

let runtimePath = currentProject.settings?.runtime?.path;
if (runtimePath && !path.isAbsolute(runtimePath)) {
runtimePath = path.resolve(currentProject.dir, runtimePath);
runtimePath = path.resolve(currentProject.dir, 'settings', runtimePath);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little worried about the amount of duplicated code. Can we add a method to the project that centralizes this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@a-b-r-o-w-n I addressed this. Want to give it another look?

@benbrown benbrown merged commit ae1ccdc into main Feb 26, 2021
@benbrown benbrown deleted the benbrown/relativepath branch February 26, 2021 17:59
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Properly support relative path to runtime

* refactor path computation into a single method on the botproject model

Co-authored-by: Andy Brown <asbrown002@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composer translates relative paths in runtime settings to absolute paths
3 participants