@autorest/powershell 3.0.489 → 3.0.490

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.
@@ -72,7 +72,7 @@
72
72
  "powershell/models/model-extensions.ts": "92f57419e2bb8aec5272d62742ad528caebb66f4",
73
73
  "powershell/module/module-class.ts": "c792f01e3bfecb7c22efd953feb175f6b8394c78",
74
74
  "powershell/module/module-namespace.ts": "f6afc90087e8d733f0323b0de8ba41d923955732",
75
- "powershell/package.json": "a821019216dff797ced9f9ce0de3da1e1fc71ba4",
75
+ "powershell/package.json": "a2f22fb74cd568e5bf10bc350cf26dd692e4170c",
76
76
  "powershell/plugins/add-azure-completers-v2.ts": "557ce4326318c82f91445490a162f20fa029fed3",
77
77
  "powershell/plugins/create-commands-v2.ts": "f14548b59f952ac5bdf3a89f52e1eeb2e05e6da0",
78
78
  "powershell/plugins/cs-namer-v2.ts": "e294a2f5ac3db421d030a3bba8343a3d4a9ea6ab",
@@ -220,7 +220,7 @@
220
220
  "powershell/resources/psruntime/BuildTime/Models/PsProxyTypes.cs": "d12d48f864b20004aa129623ebd032e8f16cdee2",
221
221
  "powershell/resources/psruntime/BuildTime/PsAttributes.cs": "db38af61484cec976c6833987625e191cfea5d5d",
222
222
  "powershell/resources/psruntime/BuildTime/PsExtensions.cs": "a816496e5ec66952ba2f8f3709f665b02e24020a",
223
- "powershell/resources/psruntime/BuildTime/PsHelpers.cs": "9958d6426383fc7325c13722d221554467b1fa93",
223
+ "powershell/resources/psruntime/BuildTime/PsHelpers.cs": "4f9aed43c1421775f94bb4a3c58921c59af9a4a3",
224
224
  "powershell/resources/psruntime/BuildTime/StringExtensions.cs": "83ef554ac7f477fa9cfdece0c83a9e176e2a8e4c",
225
225
  "powershell/resources/psruntime/BuildTime/XmlExtensions.cs": "abb7ed48b92fa656c204949f9c637def99fac991",
226
226
  "powershell/resources/psruntime/Debugging.cs": "a1ce271f69caa871f2bd7fab2e1d4e9aee0bfa2c",
@@ -315,7 +315,7 @@
315
315
  "powershell/resources/runtime/csharp/pipeline/EventListener.cs": "350991c330499c8770e33d0ca3cf34edfd93bf0a",
316
316
  "powershell/resources/runtime/csharp/pipeline/Events.cs": "660584ecfc9b22ea32287991284e4cef4623ce27",
317
317
  "powershell/resources/runtime/csharp/pipeline/ISendAsync.cs": "8bda5bc6f964056058b18446b5ba67f86cc5472b",
318
- "powershell/resources/runtime/csharp/pipeline/PipelineMocking.cs": "33810ca9f7e477886759085fb20990e0ab5a0243",
318
+ "powershell/resources/runtime/csharp/pipeline/PipelineMocking.cs": "6082ba80ed830698b034b88e31ae16050fbcd6c8",
319
319
  "powershell/resources/runtime/csharp/pipeline/Response.cs": "0916ff12e3cbe15950a260245274af684256158b",
320
320
  "powershell/resources/runtime/csharp/pipeline/delegates.cs": "3abbd1354807e026f0d05a72e7d538533d775984",
321
321
  "powershell/resources/runtime/csharp/xml/IXmlSerializable.cs": "4ec8c13c3edc40460647700ab83cd5c632caa1e7",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/powershell",
3
- "version": "3.0.489",
3
+ "version": "3.0.490",
4
4
  "description": "AutoRest PowerShell Cmdlet Generator",
5
5
  "main": "dist/exports.js",
6
6
  "typings": "dist/exports.d.ts",
@@ -39,9 +39,10 @@ namespace Microsoft.Rest.ClientRuntime.PowerShell
39
39
  public static IEnumerable<FunctionInfo> GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder)
40
40
  {
41
41
  // https://stackoverflow.com/a/40969712/294804
42
+ var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'";
42
43
  var getCmdletsCommand = $@"
43
44
  $currentFunctions = Get-ChildItem function:
44
- Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
+ Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }}
45
46
  Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }}
46
47
  ";
47
48
  return cmdlet?.RunScript<FunctionInfo>(getCmdletsCommand) ?? RunScript<FunctionInfo>(getCmdletsCommand);
@@ -259,4 +259,4 @@ namespace Microsoft.Rest.ClientRuntime
259
259
  }
260
260
  }
261
261
  }
262
- }
262
+ }