Fix exception when executing create-dist directly

This commit is contained in:
Cheng Zhao 2017-02-08 14:24:56 +09:00
parent 9163b601a4
commit 90492df1cb

View file

@ -132,9 +132,13 @@ def copy_license():
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
def create_api_json_schema():
node_bin_dir = os.path.join(SOURCE_ROOT, 'node_modules', '.bin')
env = os.environ.copy()
env['PATH'] = os.path.pathsep.join([node_bin_dir, env['PATH']])
outfile = os.path.relpath(os.path.join(DIST_DIR, 'electron-api.json'))
execute(['electron-docs-linter', 'docs', '--outfile={0}'.format(outfile),
'--version={}'.format(ELECTRON_VERSION.replace('v', ''))])
'--version={}'.format(ELECTRON_VERSION.replace('v', ''))],
env=env)
def strip_binaries():
for binary in TARGET_BINARIES[PLATFORM]: