Skip to content

Commit bb48014

Browse files
authored
Merge pull request #1138 from alibaba/fix/nas-sync
fix: nas cp [id].js file
2 parents 4b398be + 446516e commit bb48014

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib/nas/request.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const { readFileChunk } = require('./cp/file');
55
const { getServiceMeta } = require('../import/service');
66

77
const path = require('path');
8+
const _ = require('lodash');
89
const constants = require('./constants');
910
const PROXY = 'proxy';
1011

@@ -99,7 +100,7 @@ async function sendUnzipRequest(nasHttpTriggerPath, dstDir, nasZipFile, unzipFil
99100
cmd = cmd + ` '${unzipFile}'`;
100101
}
101102

102-
return await sendCmdRequest(nasHttpTriggerPath, cmd);
103+
return await sendCmdRequest(nasHttpTriggerPath, _.escapeRegExp(cmd));
103104
}
104105

105106
async function sendCleanRequest(nasHttpTriggerPath, nasZipFile) {

0 commit comments

Comments
 (0)