Skip to content

Commit 32dfa06

Browse files
authored
Fix install.py on windows (#24605)
This should unblock the emscripten-releases roller.
1 parent cc1de1a commit 32dfa06

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/test_other.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16289,3 +16289,12 @@ def test_parsetools_make_removed_fs_assert(self):
1628916289

1629016290
self.emcc(test_file('hello_world.c'), ['-lidbfs.js'], output_filename='hello_world.js')
1629116291
self.assertNotContained(removed_fs_assert_content, read_file('hello_world.js'))
16292+
16293+
@is_slow_test
16294+
@crossplatform
16295+
def test_install(self):
16296+
self.run_process([PYTHON, path_from_root('tools/install.py'), 'newdir'])
16297+
self.assertExists('newdir/emcc')
16298+
# Some files, such as as maintenance tools should not be part of the
16299+
# install.
16300+
self.assertNotExists('newdir/tools/maint/')

tools/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def copy_emscripten(target):
8585

8686

8787
def npm_install(target):
88-
subprocess.check_call(['npm', 'ci', '--omit=dev'], cwd=target)
88+
subprocess.check_call([shutil.which('npm'), 'ci', '--omit=dev'], cwd=target)
8989

9090

9191
def main():

0 commit comments

Comments
 (0)