c58b14f136
The language version was bumped in https://dart-review.googlesource.com/c/sdk/+/487883 but the formatter wasn't run. This leads to formatting diffs in unrelated CLs. Change-Id: I93de11da263d979467abb7f106ad866441680ebd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493640 Reviewed-by: Jens Johansen <jensj@google.com>
21 lines
597 B
Dart
21 lines
597 B
Dart
// Copyright (c) 2023, 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.
|
|
|
|
import 'dart:io';
|
|
|
|
String computeRepoDir() {
|
|
ProcessResult result = Process.runSync(
|
|
'git',
|
|
['rev-parse', '--show-toplevel'],
|
|
runInShell: true,
|
|
workingDirectory: new File.fromUri(Platform.script).parent.path,
|
|
);
|
|
return (result.stdout as String).trim();
|
|
}
|
|
|
|
Uri computeRepoDirUri() {
|
|
String dirPath = computeRepoDir();
|
|
return new Directory(dirPath).uri;
|
|
}
|