Skip to content

Commit 35c50ae

Browse files
committed
Await for authentication to be applied to request
1 parent 96bb098 commit 35c50ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/log.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ export class Log {
5151
this.config = config;
5252
}
5353

54-
public log(
54+
public async log(
5555
namespace: string,
5656
podName: string,
5757
containerName: string,
5858
stream: Writable,
5959
done: (err: any) => void,
6060
options: LogOptions = {},
61-
): request.Request {
61+
): Promise<request.Request> {
6262
const path = `/api/v1/namespaces/${namespace}/pods/${podName}/log`;
6363

6464
const cluster = this.config.getCurrentCluster();
@@ -75,7 +75,7 @@ export class Log {
7575
},
7676
uri: url,
7777
};
78-
this.config.applyToRequest(requestOptions);
78+
await this.config.applyToRequest(requestOptions);
7979

8080
const req = request(requestOptions, (error, response, body) => {
8181
if (error) {

0 commit comments

Comments
 (0)