@pnp/cli-microsoft365 10.2.0-beta.99aaf1e → 10.2.0-beta.9e186e5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,10 +106,10 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
106
106
  switch (platform) {
107
107
  case 'win32':
108
108
  if (client === 'classic') {
109
- cmd = 'wmic process where caption="Teams.exe" get ProcessId';
109
+ cmd = 'tasklist /FI "IMAGENAME eq Teams.exe" /FO csv';
110
110
  }
111
111
  else {
112
- cmd = 'wmic process where caption="ms-teams.exe" get ProcessId';
112
+ cmd = 'tasklist /FI "IMAGENAME eq ms-teams.exe" /FO csv';
113
113
  }
114
114
  break;
115
115
  case 'darwin':
@@ -131,7 +131,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
131
131
  else if (platform === 'win32') {
132
132
  const processJson = formatting.parseCsvToJson(cmdOutput.stdout);
133
133
  for (const proc of processJson) {
134
- process.kill(proc.ProcessId);
134
+ process.kill(proc.PID);
135
135
  }
136
136
  }
137
137
  if (this.verbose) {
package/dist/utils/spo.js CHANGED
@@ -1673,7 +1673,14 @@ export const spo = {
1673
1673
  throw new Error(errorLog.Message);
1674
1674
  }
1675
1675
  // Get the destination object information
1676
- const objectInfo = logs.find(l => l.Event === 'JobFinishedObjectInfo');
1676
+ let objectInfo = logs.find(l => l.Event === 'JobFinishedObjectInfo');
1677
+ // In rare cases, the object info may not be available yet
1678
+ if (!objectInfo) {
1679
+ // By doing a final poll, we can get the object info
1680
+ progress = await request.post(requestOptions);
1681
+ const newLogs = progress.Logs?.map(l => JSON.parse(l));
1682
+ objectInfo = newLogs.find(l => l.Event === 'JobFinishedObjectInfo');
1683
+ }
1677
1684
  return objectInfo;
1678
1685
  },
1679
1686
  /**
@@ -12,6 +12,8 @@ Retrieves information about pronouns settings for an organization
12
12
  m365 tenant people pronouns get [options]
13
13
  ```
14
14
 
15
+ ## Options
16
+
15
17
  <Global />
16
18
 
17
19
  ## Examples