From b048f5690757f0a762ca568e7f0d66c28e2a7ba3 Mon Sep 17 00:00:00 2001 From: jjorissen52 Date: Fri, 29 Jul 2022 11:53:03 -0500 Subject: [PATCH] fix: default timeout is now 2 minutes --- package.json | 2 +- src/utils.ts | 4 ++-- src/vaults/op.ts | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e2d1586..1437863 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/src/utils.ts b/src/utils.ts index 717017c..e7751c3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -62,8 +62,8 @@ export function spawn( ...args: Parameters ): Omit, "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, diff --git a/src/vaults/op.ts b/src/vaults/op.ts index d279648..0be2923 100644 --- a/src/vaults/op.ts +++ b/src/vaults/op.ts @@ -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";