Skip to content

Commit ababb55

Browse files
CDeltakaiaryanjassal
authored andcommitted
fix: add type annotations for newVaultNameInArg and newSecretPathPart in CommandRename
1 parent 280c232 commit ababb55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/secrets/CommandRename.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class CommandRename extends CommandPolykey {
103103
`EINVALID: The new secret name '${newSecretNameArg}' appears to be a path but could not be parsed: ${e.message}`,
104104
);
105105
}
106-
const newVaultNameInArg = parsedNewPath[0];
107-
const newSecretPathPart = parsedNewPath[1];
106+
const newVaultNameInArg: string = parsedNewPath[0];
107+
const newSecretPathPart: string = parsedNewPath[1];
108108
if (newVaultNameInArg !== originalVaultName) {
109109
throw new errors.ErrorPolykeyCLIRenameSecret(
110110
`ECROSSVAULT: Renaming to a different vault ('${newVaultNameInArg}') is not supported by this command. The target vault must be the same as the source vault ('${originalVaultName}').`,

0 commit comments

Comments
 (0)