Index: test/real_version_test.dart |
diff --git a/test/real_version_test.dart b/test/real_version_test.dart |
index a84f746fb8fd6e57550587a6f12be6329e039b87..97138087de49fe4b209f9b55f545314187429aa6 100644 |
--- a/test/real_version_test.dart |
+++ b/test/real_version_test.dart |
@@ -11,6 +11,7 @@ import 'package:scheduled_test/scheduled_process.dart'; |
import 'package:scheduled_test/scheduled_test.dart'; |
import '../lib/src/exit_codes.dart' as exit_codes; |
+import '../lib/src/sdk.dart' as sdk; |
import 'test_pub.dart'; |
main() { |
@@ -27,10 +28,8 @@ main() { |
// in the built SDK's "bin" directory. Note also that this invokes pub from |
// the built SDK directory, and not the live pub code directly in the repo. |
integration('parse the real SDK "version" file', () { |
- // Get the path to the pub binary in the SDK. Note that we can't use |
- // sdk.rootDirectory here because that assumes the entrypoint Dart script |
- // being run is pub itself. Here, the entrypoint is this test file. |
- var pubPath = path.join(path.dirname(Platform.executable), |
+ // Get the path to the pub binary in the SDK. |
+ var pubPath = path.join(sdk.rootDirectory, 'bin', |
Platform.operatingSystem == "windows" ? "pub.bat" : "pub"); |
var pub = new ScheduledProcess.start(pubPath, ['version']); |