-
-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify/fix join-path. #325
Merged
rkeithhill
merged 1 commit into
dahlbyk:master
from
rkeithhill:rkeithhill/is268-fix-get-sshPath
Dec 29, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// 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", | ||
|
||
// Start PowerShell | ||
"windows": { | ||
"command": "${env.windir}\\sysnative\\windowspowershell\\v1.0\\PowerShell.exe" | ||
}, | ||
"linux": { | ||
"command": "/usr/bin/powershell" | ||
}, | ||
"osx": { | ||
"command": "/usr/local/bin/powershell" | ||
}, | ||
|
||
// 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": [ | ||
{ | ||
"owner": "powershell", | ||
"fileLocation": ["absolute"], | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$", | ||
"message": 1 | ||
}, | ||
{ | ||
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$", | ||
"file": 1, | ||
"line": 2 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Import-Module $PSScriptRoot\..\posh-git.psd1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
. $PSScriptRoot\Shared.ps1 | ||
|
||
Describe 'SSH Function Tests' { | ||
Context 'Get-SshPath Tests' { | ||
It 'Returns the correct default path' { | ||
Get-SshPath | Should BeExactly $Home\.ssh\id_rsa | ||
} | ||
It 'Returns the correct path given a filename' { | ||
Get-SshPath mykey | Should BeExactly $Home\.ssh\mykey | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that these path expectations will likely fail on not-Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't but I will test it. PowerShell itself handles both
\
and/
as path sep chars. Issues arise though when a path is passed down to a native application.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so PowerShell internally handles both just fine but when you "compare exactly", the expected has to be correct. Submitting a PR to fix this.