Replace a hard-coded path with a computed path

Fixes https://github.com/dart-lang/sdk/issues/48355

Change-Id: Ib6b46ab73f7264f6f7f23a603b57d1fbbedc0752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233656
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/test/stress/replay/replay.dart b/pkg/analysis_server/test/stress/replay/replay.dart
index a674281..7de5c96 100644
--- a/pkg/analysis_server/test/stress/replay/replay.dart
+++ b/pkg/analysis_server/test/stress/replay/replay.dart
@@ -404,8 +404,7 @@
   void _runPub(String filePath) {
     var directoryPath = path.dirname(filePath);
     if (Directory(directoryPath).existsSync()) {
-      Process.runSync(
-          '/Users/brianwilkerson/Dev/dart/dart-sdk/bin/pub', ['get'],
+      Process.runSync(Platform.resolvedExecutable, ['pub', 'get'],
           workingDirectory: directoryPath);
     }
   }