Skip to content

Commit 7e258d4

Browse files
authored
Skip chmod on inproc func executable for arm64 (#4433)
1 parent cb15e8e commit 7e258d4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

publish-scripts/npm/lib/install.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ if (os.platform() === 'win32') {
4747

4848
const fileName = 'Azure.Functions.Cli.' + platform + '.' + version + '.zip';
4949
const endpoint = 'https://cdn.functions.azure.com/public/' + consolidatedBuildId + '/' + fileName;
50+
5051
console.log('attempting to GET %j', endpoint);
5152
const options = url.parse(endpoint);
53+
5254
// npm config preceed system environment
5355
// https://github.com/npm/npm/blob/19397ad523434656af3d3765e80e22d7e6305f48/lib/config/reg-client.js#L7-L8
5456
// https://github.com/request/request/blob/b12a6245d9acdb1e13c6486d427801e123fdafae/lib/getProxyFromURI.js#L66-L71
57+
5558
const proxy = process.env.npm_config_https_proxy ||
5659
process.env.npm_config_proxy ||
5760
process.env.HTTPS_PROXY ||
@@ -103,8 +106,12 @@ https.get(options, response => {
103106
if (os.platform() === 'linux' || os.platform() === 'darwin') {
104107
fs.chmodSync(`${installPath}/func`, 0o755);
105108
fs.chmodSync(`${installPath}/gozip`, 0o755);
106-
fs.chmodSync(`${installPath}/in-proc8/func`, 0o755);
107-
fs.chmodSync(`${installPath}/in-proc6/func`, 0o755);
109+
110+
// Skip for arm64 as it is not supported in the preview version
111+
if (os.arch() != 'arm64') {
112+
fs.chmodSync(`${installPath}/in-proc8/func`, 0o755);
113+
fs.chmodSync(`${installPath}/in-proc6/func`, 0o755);
114+
}
108115
}
109116
});
110117
});

0 commit comments

Comments
 (0)