-
Notifications
You must be signed in to change notification settings - Fork 233
Handle relative git-url-paths correctly when --directory #2919
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
Changes from all commits
6f0b483
c4b3fa7
fbac156
ec8f0ec
5a6c020
885892b
31894e4
d47619b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,9 +90,14 @@ class GlobalPackages { | |
// dependencies. Their executables shouldn't be cached, and there should | ||
// be a mechanism for redoing dependency resolution if a path pubspec has | ||
// changed (see also issue 20499). | ||
PackageRef ref; | ||
try { | ||
ref = cache.git.source.parseRef(name, {'url': repo}, containingPath: '.'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, we're going to write the I'm not sure it matters here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't write it to disk (yet), so it should not matter... |
||
} on FormatException catch (e) { | ||
throw ApplicationException(e.message); | ||
} | ||
await _installInCache( | ||
cache.git.source | ||
.refFor(name, repo) | ||
ref | ||
.withConstraint(VersionConstraint.any) | ||
.withFeatures(features ?? const {}), | ||
executables, | ||
|
@@ -282,7 +287,8 @@ To recompile executables, first run `global deactivate ${dep.name}`. | |
var oldPath = p.join(_directory, '$package.lock'); | ||
if (fileExists(oldPath)) deleteEntry(oldPath); | ||
|
||
writeTextFile(_getLockFilePath(package), lockFile.serialize(cache.rootDir)); | ||
writeTextFile(_getLockFilePath(package), | ||
lockFile.serialize(p.join(_directory, package))); | ||
} | ||
|
||
/// Shows the user the currently active package with [name], if any. | ||
|
Uh oh!
There was an error while loading. Please reload this page.