File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ $psEditor.Workspace.OpenFile($profile)
37
37
``` powershell
38
38
# Insert new text replacing the user's current selection
39
39
$context = $psEditor.GetEditorContext()
40
- $context.InsertText("# All your script are belong to us", $context.SelectedRange)
40
+ $context.CurrentFile. InsertText("# All your script are belong to us", $context.SelectedRange)
41
41
```
42
42
43
43
#### Setting the selection based on the cursor position
Original file line number Diff line number Diff line change 36
36
37
37
if ($Publish.IsPresent ) {
38
38
# Delete the existing docs repo folder
39
- Remove-Item - Path $docsRepoPath - Recurse - Force - ErrorAction Stop | Out-Null
39
+ if (Test-Path $docsRepoPath ) {
40
+ Remove-Item - Path $docsRepoPath - Recurse - Force - ErrorAction Stop | Out-Null
41
+ }
40
42
41
43
# Clone the documentation site branch of the Editor Services repo
42
44
git clone - b gh- pages https:// github.com / PowerShell/ PowerShellEditorServices.git $docsRepoPath
You can’t perform that action at this time.
0 commit comments