Skip to content

Commit

Permalink
Fixed Hanging bug
Browse files Browse the repository at this point in the history
Signed-off-by: AZMCode <[email protected]>
  • Loading branch information
AZMCode committed Aug 5, 2020
1 parent 09cd396 commit 3b0f2a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Download the NPM-Package asset from the latest release and run `npm install --gl
Clone the repo, and run `yarn build:all-rel && yarn global add $PWD`

## Configuration
You can run `git config --global --add bw.timeout <Timeout in seconds>` to control the timeout for the session key (Still not working, makes the program hang), and to suppress the warning that pops up otherwise 😬. You can set the timeout to -1 to disable it.
You can run `git config --global --add bw.timeout <Timeout in seconds>` to control the timeout for the session key, and to suppress the warning that pops up otherwise 😬. You can set the timeout to -1 to disable it.

## Package Documentation
[Right Here](https://azmcode.github.io/git-credential-bw/)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-credential-bw",
"version": "1.0.0",
"version": "1.0.1",
"description": "Git Credential Helper for Bitwarden CLI",
"main": "dist/main.js",
"repository": "[email protected]:AZMCode/git-credential-bw.git",
Expand Down
3 changes: 3 additions & 0 deletions src/bw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ async function runPiped(args:string[]):Promise<string>{
const ctty = await getControllingTTY()
ctty.pipe(proc.stdin);
const bwOut = await toString(proc.stdout);
proc.stderr.unpipe();
proc.stdin.destroy()
proc.stdout.destroy();
proc.stderr.destroy();
proc.kill();
process.stderr.pause();
ctty.unpipe();
ctty.destroy();
Expand Down Expand Up @@ -93,6 +95,7 @@ const getCredentials = async(input: string,sessKey:string|null):Promise<Map<stri
credentialsProc.stdin.destroy();
credentialsProc.stdout.destroy();
credentialsProc.stderr.destroy();
credentialsProc.kill();
const credentials = JSON.parse(credentialsStr);
assert(credentials.login);
const username = credentials.login.username
Expand Down

0 comments on commit 3b0f2a2

Please sign in to comment.