-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an env var to force devtools_tool to use SDKs from PATH
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
#!/bin/bash -e | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
"$SCRIPT_DIR/../flutter-sdk/bin/dart" run "$SCRIPT_DIR/devtools_tool.dart" "$@" | ||
|
||
if [ ! -z "$DEVTOOLS_TOOL_FLUTTER_FROM_PATH" ] | ||
then | ||
echo Running devtools_tool using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set | ||
dart run "$SCRIPT_DIR/devtools_tool.dart" "$@" | ||
else | ||
"$SCRIPT_DIR/../flutter-sdk/bin/dart" run "$SCRIPT_DIR/devtools_tool.dart" "$@" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
@echo off | ||
|
||
%~dp0/../flutter-sdk/bin/dart run %~dp0/devtools_tool.dart %* | ||
IF DEFINED DEVTOOLS_TOOL_FLUTTER_FROM_PATH ( | ||
echo Running devtools_tool using Dart/Flutter from PATH because DEVTOOLS_TOOL_FLUTTER_FROM_PATH is set | ||
dart run %~dp0/devtools_tool.dart %* | ||
) ELSE ( | ||
%~dp0/../flutter-sdk/bin/dart run %~dp0/devtools_tool.dart %* | ||
) | ||
|
||
EXIT /B %errorlevel% |
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