diff --git a/tools/wafadmin/Build.py b/tools/wafadmin/Build.py index 07904868cee..675bca1c47e 100644 --- a/tools/wafadmin/Build.py +++ b/tools/wafadmin/Build.py @@ -773,7 +773,7 @@ class BuildContext(Utils.Context): try: shutil.copy2(src, tgt) - if chmod < 0: os.chmod(tgt, chmod) + if chmod >= 0: os.chmod(tgt, chmod) except IOError: try: os.stat(src) diff --git a/wscript b/wscript index 3c5bda4ee26..eef883f6d8d 100644 --- a/wscript +++ b/wscript @@ -980,7 +980,7 @@ def install_npm(bld): start_dir.ant_glob('**/*'), cwd=start_dir, relative_trick=True, - chmod=0) + chmod=-1) bld.symlink_as('${PREFIX}/bin/npm', '../lib/node_modules/npm/bin/npm-cli.js')