Skip to content

Commit

Permalink
SSH requestin access message
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDimitras committed Oct 31, 2024
1 parent c66b655 commit f96e4dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/commands/shared/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ export const request =
}>,
authn?: Authn,
options?: {
accessMessage?: string;
message?: "all" | "approval-required" | "none";
}
): Promise<RequestResponse<T> | undefined> => {
const resolvedAuthn = authn ?? (await authenticate());
const { userCredential } = resolvedAuthn;
const data = await spinUntil(
"Requesting access",
options?.accessMessage ? options.accessMessage : "Requesting access",
fetchCommand<RequestResponse<T>>(resolvedAuthn, args, [
command,
...args.arguments,
Expand Down
3 changes: 2 additions & 1 deletion src/commands/shared/ssh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const provisionRequest = async (
wait: true,
},
authn,
{ message: "approval-required" }
{ accessMessage: "Checking for access in P0", message: "approval-required" }
);

if (!response) {
Expand All @@ -131,6 +131,7 @@ export const provisionRequest = async (
}
const { id, isPreexisting } = response;
if (!isPreexisting) print2("Waiting for access to be provisioned");
else print2("Existing access found. Connecting to node.");

const provisionedRequest = await waitForProvisioning<PluginSshRequest>(
authn,
Expand Down

0 comments on commit f96e4dc

Please sign in to comment.