Skip to content

Commit acc2502

Browse files
committed
Store all temp files in .local folder
1 parent 3400457 commit acc2502

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

tools/office-cmdlet-updater/config/default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"ignoreFiles": [
4040
"..\\..\\teams\\teams-ps\\teams\\teams.md",
4141
"..\\..\\whiteboard\\whiteboard-ps\\whiteboard\\whiteboard.md"
42-
]
42+
],
43+
"tempFolderPath": ".\\.local\\temp"
4344
},
4445
"sendgrid": {
4546
"sendMailNotification": false,

tools/office-cmdlet-updater/services/fs.service.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ class FsService {
8787

8888
// endregion
8989

90-
getTempFolderPath({ name, path }) {
90+
async getTempFolderPath({ name }, path) {
9191
let tempFolders = this.logStoreService.getAllTempFolders();
9292

93+
await fs.ensureDir(path);
94+
9395
if (!tempFolders.has(name)) {
9496
const tempFolderPath = `${path}\\${shortId()}`;
9597

tools/office-cmdlet-updater/services/markdown.service.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class MarkdownService {
4949
async processQueue({ file, doc }, cb) {
5050
let result, err;
5151

52+
let { tempFolderPath } = this.config.get('platyPS');
5253
const {
5354
copyMdInTempFolder,
5455
getTempFolderPath,
@@ -57,7 +58,7 @@ class MarkdownService {
5758

5859
await this._installDependenceIfNeeded(doc);
5960

60-
const [tempFolderPath] = getTempFolderPath(doc);
61+
[tempFolderPath] = await getTempFolderPath(doc, tempFolderPath);
6162

6263
const logFilePath = `${tempFolderPath}\\${shortId()}.log`;
6364

0 commit comments

Comments
 (0)