Skip to content

Commit aba2c4b

Browse files
committed
fix: fix nasConfig and logConfig
1 parent 1c65b3f commit aba2c4b

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

__tests__/e2e/nodejs/s_oss_config_auto.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ resources:
5555
handler: index.handler
5656
memorySize: 128
5757
timeout: 60
58-
nasConfig: auto|mountDir=/mnt/fcDir|nasDir=/mnt/nasDir
58+
nasConfig: auto|mountDir=/mnt/fcDir|nasDir=nasDir
5959
vpcConfig: auto
6060

6161
fcDemo4: # 业务名称/模块名称

src/subCommands/deploy/impl/function.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ vpcConfig:
464464
? validateAndNormalizePath(params.mountDir, 'mountDir')
465465
: `/mnt/${functionName}`;
466466
const customServerAddr = params.nasDir ? params.nasDir : `${functionName}`;
467-
let serverAddr = `${mountTargetDomain}:/${customServerAddr}`;
467+
let serverAddr = `${mountTargetDomain}:${
468+
customServerAddr.startsWith('/') ? '' : '/'
469+
}${customServerAddr}`;
468470
if (serverAddr.length > 128) {
469471
serverAddr = serverAddr.substring(0, 128);
470472
}

src/subCommands/model/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ vpcConfig:
246246
? validateAndNormalizePath(params.mountDir, 'mountDir')
247247
: `/mnt/${functionName}`;
248248
const customServerAddr = params.nasDir ? params.nasDir : `${functionName}`;
249-
let serverAddr = `${mountTargetDomain}:/${customServerAddr}`;
249+
let serverAddr = `${mountTargetDomain}:${
250+
customServerAddr.startsWith('/') ? '' : '/'
251+
}${customServerAddr}`;
250252
if (serverAddr.length > 128) {
251253
serverAddr = serverAddr.substring(0, 128);
252254
}

0 commit comments

Comments
 (0)