Skip to content

Commit

Permalink
fix: Fixed npm install on Windows without having to use wsl (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
eicki authored Oct 5, 2023
1 parent 754fa22 commit ffa56e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,12 +1240,16 @@ def install_npm_requirements(query, requirements_file, tmp_dir):
shutil.copyfile(requirements_file, target_file)

subproc_env = None
if not docker and OSX:
subproc_env = os.environ.copy()
npm_exec = 'npm'
if not docker:
if WINDOWS:
npm_exec = 'npm.cmd'
elif OSX:
subproc_env = os.environ.copy()

# Install dependencies into the temporary directory.
with cd(temp_dir):
npm_command = ['npm', 'install']
npm_command = [npm_exec, 'install']
if docker:
with_ssh_agent = docker.with_ssh_agent
chown_mask = '{}:{}'.format(os.getuid(), os.getgid())
Expand Down

0 comments on commit ffa56e8

Please sign in to comment.