Bug 1575135 - Return an unicode path for nodejs. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 20 Aug 2019 21:24:35 +0000
changeset 489122 7e4b8df1e96a286ce22f2c2aff54ce2bcc445af4
parent 489121 2139ee18939eae14ea337e29ec46639d2b25836d
child 489123 b651185f9573fcb05a1c25d7a80cf203d249cc67
push id36465
push userdvarga@mozilla.com
push dateWed, 21 Aug 2019 16:47:43 +0000
treeherdermozilla-central@4ab60925635c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1575135
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1575135 - Return an unicode path for nodejs. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D42606
build/moz.configure/node.configure
--- a/build/moz.configure/node.configure
+++ b/build/moz.configure/node.configure
@@ -9,16 +9,17 @@ option('--disable-nodejs',
 option(env='NODEJS', nargs=1, help='Path to nodejs')
 
 
 @depends('--enable-nodejs', 'NODEJS')
 @checking('for nodejs',
           callback=lambda x: '%s (%s)' % (x.path, x.str_version) if x else 'no')
 @imports(_from='mozbuild.nodeutil', _import='find_node_executable')
 @imports(_from='mozbuild.nodeutil', _import='NODE_MIN_VERSION')
+@imports(_from='mozbuild.util', _import='system_encoding')
 def nodejs(require, env_node):
     node_exe = env_node[0] if env_node else None
 
     nodejs, version = find_node_executable(node_exe)
 
     MAYBE_FILE_A_BUG = '''
 
     Executing `mach bootstrap --no-system-changes` should
@@ -46,15 +47,15 @@ def nodejs(require, env_node):
 
         if require:
             raise FatalCheckError(msg)
         else:
             log.warning(msg)
             return
 
     return namespace(
-        path=nodejs,
+        path=nodejs.decode(system_encoding),
         version=version,
         str_version='.'.join(str(v) for v in version),
     )
 
 
 set_config('NODEJS', depends_if(nodejs)(lambda p: p.path))