Skip to content

Commit

Permalink
fix: default timeout is now 2 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
jjorissen52 committed Jul 29, 2022
1 parent 214dba0 commit b048f56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jjorissen52/env-vault",
"version": "0.1.5",
"version": "0.1.6",
"description": "Utility for environment synchronization with credentials vaults.",
"license": "MIT",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export function spawn(
...args: Parameters<typeof spawnSync>
): Omit<ReturnType<typeof spawnSync>, "error"> {
const [command, _args, options] = args;
// default timeout is 5 seconds
const timeout = options?.timeout ?? 5000;
// default timeout is 2 minutes
const timeout = options?.timeout ?? 120_000;
const { error, ...others } = spawnSync(command, _args, {
...options,
timeout,
Expand Down
1 change: 0 additions & 1 deletion src/vaults/op.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ function login(account: AccountData): [string, string] {
const { user_uuid, shorthand } = account;
const res = spawn("op", ["signin", "--account", shorthand, "--raw"], {
stdio: ["inherit", "pipe", "pipe"],
timeout: 120_000, // 120s
});
if (res.status) {
let message = "login failure; exiting";
Expand Down

0 comments on commit b048f56

Please sign in to comment.