Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Fix auth for task plugin task exited feature. (#371)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
  • Loading branch information
AndrienkoAleksandr committed Jul 25, 2019
1 parent df97d28 commit b6ebc38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/task-plugin/src/machine/machine-exec-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ export class MachineExecClient {
throw new Error('URL for machine-exec server is not found in the current workspace.');
}

const execServerUrl = applySegmentsToUri(machineExecServerEndpoint, CONNECT_TERMINAL_SEGMENT);
let execServerUrl = applySegmentsToUri(machineExecServerEndpoint, CONNECT_TERMINAL_SEGMENT);

const machineToken = process.env['CHE_MACHINE_TOKEN'];
if (machineToken) {
execServerUrl = `${execServerUrl}?token=${machineToken}`;
}

this.connection = await createConnection(execServerUrl);

this.machineExecWatcher.init(this.connection);
Expand Down

0 comments on commit b6ebc38

Please sign in to comment.