You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`EINVALID: The new secret name '${newSecretNameArg}' appears to be a path but could not be parsed: ${e.message}`,
104
-
);
105
-
}
106
-
constnewVaultNameInArg: string=parsedNewPath[0];
107
-
constnewSecretPathPart: string=parsedNewPath[1];
108
-
if(newVaultNameInArg!==originalVaultName){
109
-
thrownewerrors.ErrorPolykeyCLIRenameSecret(
110
-
`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}').`,
111
-
);
112
-
}
113
-
if(
114
-
newSecretPathPart==null||
115
-
newSecretPathPart.trim()===''||
116
-
newSecretPathPart.trim()==='/'
117
-
){
118
-
thrownewerrors.ErrorPolykeyCLIRenameSecret(
119
-
`EINVALID: The path component of the new secret name '${newSecretNameArg}' is empty or invalid.`,
`EINVALID: Could not extract a valid base name from the path component '${newSecretPathPart}' in '${newSecretNameArg}'.`,
126
-
);
127
-
}
128
-
finalNewBaseName=parts[parts.length-1];
129
-
}else{
130
-
if(newSecretNameArg.includes('/')){
131
-
thrownewerrors.ErrorPolykeyCLIRenameSecret(
132
-
`EINVALIDNAME: The new secret name '${newSecretNameArg}' must be a base name and cannot contain '/'. If you intended to specify a path, include the vault name (e.g., '${originalVaultName}:/path/NewName').`,
`EINVALIDCHAR: The final new secret name '${finalNewBaseName}' (derived from '${newSecretNameArg}') is invalid. It cannot contain '/' or ':' characters.`,
0 commit comments