Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleaning username a win8 compat way

  • Loading branch information...
commit 2cd6c455a25817216ea4d4b4e2695b664afe0c08 1 parent 1abdf02
Ryan Cromwell authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 PsGist.psm1
View
10 PsGist.psm1
@@ -4,6 +4,10 @@ function Get-Github-Credential($username) {
$host.ui.PromptForCredential("Github Credential", "Please enter your Github user name and password.", $username, "")
}
+function Clean-Username($username) {
+ $username.Replace("\", "")
+}
+
function New-DiffGist {
<#
.Synopsis
@@ -72,7 +76,7 @@ function New-DiffGist {
return
}
- $username = $credential.Username
+ $username = (Clean-Username $credential.Username)
$password = $credential.Password
$bstrpassword= [Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)
@@ -226,7 +230,7 @@ function New-Gist {
return
}
- $username = $credential.Username
+ $username = (Clean-Username $credential.Username)
$password = $credential.Password
$bstrpassword= [Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)
@@ -295,4 +299,4 @@ new-alias Create-Gist New-Gist # For those who saw my post when I used create...
new-alias diffgist New-DiffGist
export-modulemember -alias * -function New-Gist
-export-modulemember -alias * -function New-DiffGist
+export-modulemember -alias * -function New-DiffGist
Please sign in to comment.
Something went wrong with that request. Please try again.