Skip to content

Commit

Permalink
Merge branch 'master' into AllUsers
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk authored Jan 1, 2018
2 parents 76d52f5 + 2ecf05a commit 08d73ec
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 41 deletions.
63 changes: 30 additions & 33 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${relativeFile}: the current opened file relative to workspaceRoot
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"version": "2.0.0",

// Start PowerShell
"windows": {
"command": "${env:windir}\\System32\\windowspowershell\\v1.0\\PowerShell.exe"
"options": {
"shell": {
"executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ]
}
}
},
"linux": {
"command": "/usr/bin/powershell"
"options": {
"shell": {
"executable": "/usr/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},
"osx": {
"command": "/usr/local/bin/powershell"
"options": {
"shell": {
"executable": "/usr/local/bin/pwsh",
"args": [ "-NoProfile", "-Command" ]
}
}
},

// The command is a shell script
"isShellCommand": true,

// Show the output window always
"showOutput": "always",

"args": [
"-NoProfile", "-ExecutionPolicy", "Bypass"
],

// Associate with test task runner
"tasks": [
{
"taskName": "Test",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester'; Invoke-Pester test -PesterOption @{IncludeVSCodeMarker=$true};",
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
],
"problemMatcher": "$pester"
"label": "Test",
"type": "shell",
"command": "Invoke-Pester test -PesterOption @{IncludeVSCodeMarker=$true}",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": [
"$pester"
]
}
]
]
}
16 changes: 8 additions & 8 deletions src/GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,16 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) {
$indexPaths = @(GetUniquePaths $indexAdded,$indexModified,$indexDeleted,$indexUnmerged)
$workingPaths = @(GetUniquePaths $filesAdded,$filesModified,$filesDeleted,$filesUnmerged)
$index = (,$indexPaths) |
Add-Member -PassThru NoteProperty Added $indexAdded.ToArray() |
Add-Member -PassThru NoteProperty Modified $indexModified.ToArray() |
Add-Member -PassThru NoteProperty Deleted $indexDeleted.ToArray() |
Add-Member -PassThru NoteProperty Unmerged $indexUnmerged.ToArray()
Add-Member -Force -PassThru NoteProperty Added $indexAdded.ToArray() |
Add-Member -Force -PassThru NoteProperty Modified $indexModified.ToArray() |
Add-Member -Force -PassThru NoteProperty Deleted $indexDeleted.ToArray() |
Add-Member -Force -PassThru NoteProperty Unmerged $indexUnmerged.ToArray()

$working = (,$workingPaths) |
Add-Member -PassThru NoteProperty Added $filesAdded |
Add-Member -PassThru NoteProperty Modified $filesModified.ToArray() |
Add-Member -PassThru NoteProperty Deleted $filesDeleted.ToArray() |
Add-Member -PassThru NoteProperty Unmerged $filesUnmerged.ToArray()
Add-Member -Force -PassThru NoteProperty Added $filesAdded |
Add-Member -Force -PassThru NoteProperty Modified $filesModified.ToArray() |
Add-Member -Force -PassThru NoteProperty Deleted $filesDeleted.ToArray() |
Add-Member -Force -PassThru NoteProperty Unmerged $filesUnmerged.ToArray()

$result = New-Object PSObject -Property @{
GitDir = $gitDir
Expand Down

0 comments on commit 08d73ec

Please sign in to comment.