Try using node+rapydscript on appveyor as well

This commit is contained in:
Kovid Goyal 2017-06-10 10:37:22 +05:30
parent e1f81c563d
commit f863d3b46a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 16 additions and 6 deletions

View File

@ -5,6 +5,15 @@ clone_depth: 5
cache: cache:
- .build-cache - .build-cache
- node_modules -> .appveyor.yml
install:
- ps: Install-Product node 7
- node --version
- npm --version
- appveyor-retry npm install --no-optional rapydscript-ng regenerator uglify-js
- set PATH=node_modules\.bin;%PATH%
- rapydscript --version
environment: environment:
SW: C:\sw SW: C:\sw

View File

@ -184,7 +184,7 @@ def sw():
def sanitize_path(): def sanitize_path():
needed_paths = [] needed_paths = []
executables = 'git.exe curl.exe'.split() executables = 'git.exe curl.exe rapydscript.cmd node.exe'.split()
for p in os.environ['PATH'].split(os.pathsep): for p in os.environ['PATH'].split(os.pathsep):
for x in tuple(executables): for x in tuple(executables):
if os.path.exists(os.path.join(p, x)): if os.path.exists(os.path.join(p, x)):
@ -195,6 +195,7 @@ def sanitize_path():
sw sw
).split() + needed_paths ).split() + needed_paths
os.environ[b'PATH'] = os.pathsep.join(paths).encode('ascii') os.environ[b'PATH'] = os.pathsep.join(paths).encode('ascii')
print('PATH:', os.environ[b'PATH'])
def vcenv(): def vcenv():

View File

@ -93,13 +93,13 @@ def shorten_components_to(length, components, more_to_take=0, last_has_extension
def find_executable_in_path(name, path=None): def find_executable_in_path(name, path=None):
if path is None: if path is None:
path = os.environ.get('PATH', '') path = os.environ.get('PATH', '')
if iswindows and not name.endswith('.exe'): exts = '.exe .cmd .bat'.split() if iswindows and not name.endswith('.exe') else ('',)
name += '.exe'
path = path.split(os.pathsep) path = path.split(os.pathsep)
for x in path: for x in path:
q = os.path.abspath(os.path.join(x, name)) for ext in exts:
if os.access(q, os.X_OK): q = os.path.abspath(os.path.join(x, name)) + ext
return q if os.access(q, os.X_OK):
return q
def is_case_sensitive(path): def is_case_sensitive(path):