mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
![Siva Annamalai](/assets/img/avatar_default.png)
This reverts commit7bb6841815
. Reason for revert: Flutter rolls are failing, please see https://github.com/flutter/engine/pull/31332 Original change's description: > Reland "Remove the pub top-level" > > This is a reland of872ffa85c2
> > Original change's description: > > Remove the pub top-level > > > > The old pub toplevel interface is still reachable via > > > > ``` > > $ dart __deprecated_pub > > ``` > > > > That is what `flutter pub` is using. > > > > Part of https://github.com/dart-lang/sdk/issues/46100 > > > > Bug: https://github.com/dart-lang/pub/issues/3292 > > Change-Id: I97a14f2458d0f67c7bf98a90664d504cfaba0e98 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229541 > > Reviewed-by: Jonas Jensen <jonasfj@google.com> > > Reviewed-by: Michael Thomsen <mit@google.com> > > Commit-Queue: Sigurd Meldgaard <sigurdm@google.com> > > Bug: https://github.com/dart-lang/pub/issues/3292 > Change-Id: I45b5bf93f30c8abad4558cb15b61289c6c786f65 > Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try,flutter-engine-linux-web_tests-try,flutter-frontend-try > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231943 > Reviewed-by: Jonas Jensen <jonasfj@google.com> > Reviewed-by: Michael Thomsen <mit@google.com> > Commit-Queue: Sigurd Meldgaard <sigurdm@google.com> # Not skipping CQ checks because original CL landed > 1 day ago. Bug: https://github.com/dart-lang/pub/issues/3292 Change-Id: Ie64d894efac2b5d686f470e2465819c74dd917ff Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try,flutter-engine-linux-web_tests-try,flutter-frontend-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232131 Reviewed-by: Siva Annamalai <asiva@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Siva Annamalai <asiva@google.com>
48 lines
1.3 KiB
Bash
Executable file
48 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
# Run pub.dart on the Dart VM. This script assumes the Dart SDK's directory
|
|
# structure.
|
|
|
|
function follow_links() {
|
|
file="$1"
|
|
while [ -h "$file" ]; do
|
|
# On Mac OS, readlink -f doesn't work.
|
|
file="$(readlink "$file")"
|
|
done
|
|
echo "$file"
|
|
}
|
|
|
|
function array_contains() {
|
|
local needle="$1"
|
|
local element
|
|
shift
|
|
for element; do [ "$element" = "$needle" ] && return 0; done
|
|
return 1
|
|
}
|
|
|
|
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
|
|
PROG_NAME="$(follow_links "$BASH_SOURCE")"
|
|
|
|
# Handle the case where dart-sdk/bin has been symlinked to.
|
|
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
|
DART="$BIN_DIR/dart"
|
|
|
|
unset VM_OPTIONS
|
|
declare -a VM_OPTIONS
|
|
|
|
# Allow extra VM options to be passed in through an environment variable.
|
|
if [[ $DART_VM_OPTIONS ]]; then
|
|
read -a OPTIONS <<< "$DART_VM_OPTIONS"
|
|
VM_OPTIONS+=("${OPTIONS[@]}")
|
|
fi
|
|
|
|
if [ -t 2 ]; then # Only print warning when run in terminal.
|
|
>&2 echo 'The top level `pub` command is deprecated. Use `dart pub` instead.'
|
|
fi
|
|
|
|
# Forward to the `dart __deprecatedpub` command.
|
|
exec "$DART" "${VM_OPTIONS[@]}" __deprecated_pub "$@"
|