Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: lib/src/entrypoint.dart

Issue 1413713010: Fix error detection for a non-existent global script. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Fix test Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/barback/dependency_computer.dart ('k') | lib/src/executable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/entrypoint.dart
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index fd88b8da80cf42d7ec64f00d21f465121658f418..60f07eead00353d3260b283d683b2c6080c4766d 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -56,6 +56,9 @@ class Entrypoint {
/// real directory on disk.
final bool _inMemory;
+ /// Whether this is an entrypoint for a globally-activated package.
+ final bool isGlobal;
+
/// The lockfile for the entrypoint.
///
/// If not provided to the entrypoint, it will be loaded lazily from disk.
@@ -111,20 +114,23 @@ class Entrypoint {
/// If [packageSymlinks] is `true`, this will create a "packages" directory
/// with symlinks to the installed packages. This directory will be symlinked
/// into any directory that might contain an entrypoint.
- Entrypoint(String rootDir, SystemCache cache, {bool packageSymlinks: true})
+ Entrypoint(String rootDir, SystemCache cache, {bool packageSymlinks: true,
+ this.isGlobal: false})
: root = new Package.load(null, rootDir, cache.sources),
cache = cache,
_packageSymlinks = packageSymlinks,
_inMemory = false;
/// Creates an entrypoint given package and lockfile objects.
- Entrypoint.inMemory(this.root, this._lockFile, this.cache)
+ Entrypoint.inMemory(this.root, this._lockFile, this.cache,
+ {this.isGlobal: false})
: _packageSymlinks = false,
_inMemory = true;
/// Creates an entrypoint given a package and a [solveResult], from which the
/// package graph and lockfile will be computed.
- Entrypoint.fromSolveResult(this.root, this.cache, SolveResult solveResult)
+ Entrypoint.fromSolveResult(this.root, this.cache, SolveResult solveResult,
+ {this.isGlobal: false})
: _packageSymlinks = false,
_inMemory = true {
_packageGraph = new PackageGraph.fromSolveResult(this, solveResult);
« no previous file with comments | « lib/src/barback/dependency_computer.dart ('k') | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698