mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:29:50 +00:00
[infra] Fix default path to git directory when running GN
This should fix the tools/get_dot_git_folder.py script when running the Debian package build from a source tarball. Change-Id: I703fa34bbb6c73763c385e7d05b130091a131ade Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191401 Reviewed-by: Jens Johansen <jensj@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
parent
00b6a815d9
commit
e900b9c090
|
@ -20,7 +20,10 @@ declare_args() {
|
||||||
# file under the git worktree folder.
|
# file under the git worktree folder.
|
||||||
# The script run here should take care of everything automatically though.
|
# The script run here should take care of everything automatically though.
|
||||||
default_git_folder = exec_script("$_dart_root/tools/get_dot_git_folder.py",
|
default_git_folder = exec_script("$_dart_root/tools/get_dot_git_folder.py",
|
||||||
[ rebase_path("$_dart_root/.git") ],
|
[
|
||||||
|
rebase_path("$_dart_root/.git"),
|
||||||
|
"$_dart_root/.git",
|
||||||
|
],
|
||||||
"trim string")
|
"trim string")
|
||||||
|
|
||||||
# Whether to enable the SDK hash check that will prevent loading a kernel
|
# Whether to enable the SDK hash check that will prevent loading a kernel
|
||||||
|
|
|
@ -14,9 +14,8 @@ import utils
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 3:
|
||||||
raise Exception('Expects exactly 1 argument.')
|
raise Exception('Expects exactly 2 arguments.')
|
||||||
|
|
||||||
args = ['git', 'rev-parse', '--resolve-git-dir', sys.argv[1]]
|
args = ['git', 'rev-parse', '--resolve-git-dir', sys.argv[1]]
|
||||||
|
|
||||||
windows = utils.GuessOS() == 'win32'
|
windows = utils.GuessOS() == 'win32'
|
||||||
|
@ -40,8 +39,8 @@ def main():
|
||||||
|
|
||||||
print(outs.strip())
|
print(outs.strip())
|
||||||
except:
|
except:
|
||||||
# Fall-back to ".git".
|
# Fall back to fall-back path.
|
||||||
print(".git")
|
print(sys.argv[2])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue