This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix relative path tool path #9330
Merged
wli3
merged 3 commits into
dotnet:release/2.1.4xx
from
wli3:fix-relative-path-tool-path
May 25, 2018
Merged
Fix relative path tool path #9330
wli3
merged 3 commits into
dotnet:release/2.1.4xx
from
wli3:fix-relative-path-tool-path
May 25, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wli3
commented
May 22, 2018
@@ -119,6 +119,11 @@ public static string GetRelativePath(DirectoryInfo directory, FileSystemInfo chi | |||
/// </summary> | |||
public static string GetRelativePath(string path1, string path2) | |||
{ | |||
if (!Path.IsPathRooted(path1) || !Path.IsPathRooted(path2)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
wli3
force-pushed
the
fix-relative-path-tool-path
branch
from
May 22, 2018 18:18
18216c0
to
a2f0729
Compare
wli3
commented
May 22, 2018
var appHostDestinationFilePath = shimPath.Value; | ||
var appBinaryFilePath = PathUtility.GetRelativePath(appHostDestinationFilePath, entryPoint.Value); | ||
var appHostDestinationFilePath = Path.GetFullPath(shimPath.Value); | ||
var appBinaryFilePath = Path.GetRelativePath(Path.GetDirectoryName(appHostDestinationFilePath), Path.GetFullPath(entryPoint.Value)); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Do we have a test to cover the execution of the shim with |
let me add test |
wli3
force-pushed
the
fix-relative-path-tool-path
branch
from
May 22, 2018 23:54
a2f0729
to
9a7ea3b
Compare
wli3
force-pushed
the
fix-relative-path-tool-path
branch
from
May 22, 2018 23:57
9a7ea3b
to
42e1bee
Compare
wli3
commented
May 22, 2018
@@ -45,6 +45,27 @@ public void GivenAnExecutablePathItCanGenerateShimFile() | |||
stdOut.Should().Contain("Hello World"); | |||
} | |||
|
|||
// Reproduce https://github.com/dotnet/cli/issues/9319 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@dotnet-bot test Ubuntu x64 Release Build |
🔔 @peterhuene @nguerrera :) |
peterhuene
approved these changes
May 24, 2018
livarcocc
added a commit
to livarcocc/cli-1
that referenced
this pull request
Jun 8, 2018
* master: (31 commits) Updating signing project to use new intermediate directory (int). Update runtimeconfig.json doc for 2.1 (dotnet#9382) Shortening the path to the intermediate folder by renaming it to int. fix typo (dotnet#9364) Updating asp.net to 2.2.0 as well. Updating the build and tests to work with the 2.2.0 runtime. Simplified combining dictionaries in Telemetry Fixing 'Channel' and 'BranchName': "release/2.1.4xx" to "master" (dotnet#9362) Fix extraction of folders (dotnet#9335) Update Sha256Hasher.cs Fix relative path tool path (dotnet#9330) Insert updated SDK from 2.1.4xx branch MSBuild 15.8.60 Fix crash when user home directory cannot be determined. Make `CliFolderPathCalculator` a static class. Don't add the ReleaseSuffix to the branding on the CLI when DropSuffix is set to true. Add retry when Directory.Move (dotnet#9313) Override new SdkResult public properties Add reference to Microsoft.Build.NuGetSdkResolver Disable crossgen for MSBuild inline-task refs ... README.md build/BranchInfo.props build/BundledTemplates.props build/DependencyVersions.props build/Version.props src/redist/redist.csproj test/EndToEnd/GivenAspNetAppsResolveImplicitVersions.cs tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj
wli3
pushed a commit
to wli3/cli
that referenced
this pull request
Jun 15, 2018
Pass full path to Path.GetRelativePath
dotnet-maestro-bot
pushed a commit
to dotnet-maestro-bot/cli
that referenced
this pull request
Aug 7, 2018
…e_master_cli * 'master' of /Users/livarcocc/Documents/git/cli: (1063 commits) Updating signing project to use new intermediate directory (int). Update runtimeconfig.json doc for 2.1 (dotnet#9382) Shortening the path to the intermediate folder by renaming it to int. fix typo (dotnet#9364) Updating asp.net to 2.2.0 as well. Updating the build and tests to work with the 2.2.0 runtime. Simplified combining dictionaries in Telemetry Fixing 'Channel' and 'BranchName': "release/2.1.4xx" to "master" (dotnet#9362) Fix extraction of folders (dotnet#9335) Update Sha256Hasher.cs Fix relative path tool path (dotnet#9330) Insert updated SDK from 2.1.4xx branch MSBuild 15.8.60 Fix crash when user home directory cannot be determined. Make `CliFolderPathCalculator` a static class. Don't add the ReleaseSuffix to the branding on the CLI when DropSuffix is set to true. Add retry when Directory.Move (dotnet#9313) Override new SdkResult public properties Add reference to Microsoft.Build.NuGetSdkResolver Disable crossgen for MSBuild inline-task refs ...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix https://github.com/dotnet/cli/issues/9319
Replace PathUtility with new Path.GetRelativePath corefx api
Pass pull path to such api
It would like to have a next step later that enforces DirectoryPath and FilePath always store full path. The problem I have is Path behaves differently in windows and mac. For example, /home means different thing in windows and unix. So if I store full path currently, a lot of test will fail. But I think it worth to do the proper fix to eliminate the whole class of bugs