2017-02-21 12:56:28 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# Copyright (c) 2017, 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 os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import utils
|
|
|
|
|
2019-08-05 20:34:31 +00:00
|
|
|
|
2017-02-21 12:56:28 +00:00
|
|
|
def Main():
|
2019-08-05 20:34:31 +00:00
|
|
|
args = sys.argv[1:]
|
|
|
|
yaml2json_dart = os.path.relpath(
|
|
|
|
os.path.join(os.path.dirname(__file__), "yaml2json.dart"))
|
|
|
|
command = [utils.CheckedInSdkExecutable(), yaml2json_dart] + args
|
2017-02-21 12:56:28 +00:00
|
|
|
|
2019-08-05 20:34:31 +00:00
|
|
|
with utils.CoreDumpArchiver(args):
|
|
|
|
exit_code = subprocess.call(command)
|
2017-02-21 12:56:28 +00:00
|
|
|
|
2019-08-05 20:34:31 +00:00
|
|
|
utils.DiagnoseExitCode(exit_code, command)
|
|
|
|
return exit_code
|
2017-02-21 12:56:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2019-08-05 20:34:31 +00:00
|
|
|
sys.exit(Main())
|