cloud: additional bin path fixes

This commit is contained in:
Koushik Dutta
2023-09-03 17:45:55 -07:00
parent abd1227fab
commit 73fc738c0b
4 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
{
"scrypted.debugHost": "127.0.0.1",
"scrypted.debugHost": "koushik-ubuntu",
}

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/cloud",
"version": "0.1.37",
"version": "0.1.38",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/cloud",
"version": "0.1.37",
"version": "0.1.38",
"dependencies": {
"@eneris/push-receiver": "^3.1.4",
"@scrypted/common": "file:../../common",

View File

@@ -54,5 +54,5 @@
"@types/nat-upnp": "^1.1.2",
"@types/node": "^20.4.5"
},
"version": "0.1.37"
"version": "0.1.38"
}

View File

@@ -800,8 +800,9 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
const pluginVolume = process.env.SCRYPTED_PLUGIN_VOLUME;
const version = 2;
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`, `${process.platform}-${process.arch}`);
const bin = path.join(cloudflareD, cloudflared.bin);
if (!fs.existsSync(cloudflared.bin)) {
if (!fs.existsSync(bin)) {
for (let i = 0; i <= version; i++) {
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`);
rmSync(cloudflareD, {
@@ -809,7 +810,6 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
recursive: true,
});
}
const bin = path.join(cloudflareD, cloudflared.bin);
if (process.platform === 'darwin' && process.arch === 'arm64') {
const bin = path.join(cloudflareD, cloudflared.bin);
mkdirSync(path.dirname(bin), {