Skip to content

Commit 1fed6a1

Browse files
authored
Merge pull request MicrosoftDocs#2015 from Fogolan/tools
Store all temp files in .local folder and update readme.md
2 parents 7331002 + 7b24164 commit 1fed6a1

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

tools/office-cmdlet-updater/README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@
22

33
## Usage:
44
1. Clone repo at: https://github.com/microsoftdocs/office-docs-powershell
5-
1. Configure your email address in tools/.local/config/default.json to receive emailed logs. (OPTIONAL)
6-
1. Confirm you have NodeJS installed.
7-
Open PowerShell or GitBash and type `npm --version`.
5+
2. Configure your email address in tools/.local/config/default.json to receive emailed logs. (OPTIONAL)
6+
3. Confirm you have NodeJS installed.
7+
Open PowerShell or GitBash and type `npm --version`.
88
If not, install from [https://nodejs.org/en/download/](https://nodejs.org/en/download/).
9-
1. Open GitBash or PowerShell and cd into office-docs-powershell/tools/office-powershell-updater
10-
1. Install the required modules, type `npm install` and press Enter.
11-
1. Install required PowerShell modules and connectors:
12-
- Skype for Business Online: https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell
9+
4. Open GitBash or PowerShell and cd into office-docs-powershell/tools/office-powershell-updater
10+
5. Install the required modules, type `npm install` and press Enter.
11+
6. Install required PowerShell modules and connectors:
12+
- Skype for Business Online:
13+
- https://www.microsoft.com/en-in/download/confirmation.aspx?id=39366
14+
- execute into console winrm quickconfig
1315
- Microsoft Teams:
14-
- SharePoint Online:
15-
- Exchange Online:
16-
- Whiteboard:
17-
- StaffHub:
18-
- Office Online Server:
19-
- SharePoint Migration Tool (SPMT):
20-
1. Run the app, type `npm start` and press Enter.
16+
- SharePoint Online:
17+
- https://www.microsoft.com/en-gb/download/details.aspx?id=35588
18+
- Exchange Online:
19+
- Whiteboard:
20+
- StaffHub:
21+
- Office Online Server:
22+
- SharePoint Migration Tool (SPMT):
23+
7. Run the app, type `npm start` and press Enter.
2124

2225
## Notes
2326
1. The modules are installed from the PowerShell Gallery (PSGallery).

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)