Skip to content

Commit

Permalink
try to use use?
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Jan 6, 2025
1 parent 750ac1a commit b23781c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions builder/imports/nodejs.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,12 @@ def install_node_via_nvm(self, env):

# Fetch path to installed node, add to PATH
if current_os() != 'windows':
result = sh.exec(self.nvm, 'which', self.version, check=True)
node_path = os.path.dirname(result.output)
sh.setenv('PATH', '{}{}{}'.format(
node_path, os.pathsep, sh.getenv('PATH')))
sh.exec('echo', '$PATH')
sh.exec(self.nvm, 'use', self.version, check=True)
sh.exec('node', '--version', check=True)
else:
sh.exec('nvm', 'use', '10.16', check=True)
sh.exec('refreshenv', check=True)

sh.exec('ls', '-l', '/root/.nvm/versions/node/v14.21.3/bin/')
sh.exec('/root/.nvm/versions/node/v14.21.3/bin/node', '--version')
sh.exec('node', '--version', check=True)

def install_nvm_choco(self, env):
Expand Down

0 comments on commit b23781c

Please sign in to comment.