mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 03:44:05 -05:00
tools/setup: don't overwrite existing args.gn
This commit is contained in:
parent
f47582bbc5
commit
fe9ca53bc2
1 changed files with 4 additions and 3 deletions
|
@ -63,8 +63,6 @@ def get_gn_args():
|
||||||
def gn_gen(mode):
|
def gn_gen(mode):
|
||||||
os.environ["DENO_BUILD_MODE"] = mode
|
os.environ["DENO_BUILD_MODE"] = mode
|
||||||
|
|
||||||
gn_args = get_gn_args()
|
|
||||||
|
|
||||||
# mkdir $build_path(). We do this so we can write args.gn before running gn gen.
|
# mkdir $build_path(). We do this so we can write args.gn before running gn gen.
|
||||||
if not os.path.isdir(build_path()):
|
if not os.path.isdir(build_path()):
|
||||||
os.makedirs(build_path())
|
os.makedirs(build_path())
|
||||||
|
@ -73,7 +71,10 @@ def gn_gen(mode):
|
||||||
# This is to avoid quoting/escaping complications when passing overrides as
|
# This is to avoid quoting/escaping complications when passing overrides as
|
||||||
# command-line arguments.
|
# command-line arguments.
|
||||||
args_filename = os.path.join(build_path(), "args.gn")
|
args_filename = os.path.join(build_path(), "args.gn")
|
||||||
if not os.path.exists(args_filename) or gn_args:
|
if os.path.exists(args_filename):
|
||||||
|
print "Skip writing args file: '%s' already exists." % args_filename
|
||||||
|
else:
|
||||||
|
gn_args = get_gn_args()
|
||||||
with open(args_filename, "w+") as f:
|
with open(args_filename, "w+") as f:
|
||||||
f.write("\n".join(gn_args) + "\n")
|
f.write("\n".join(gn_args) + "\n")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue