Skip to content

Commit 0b6de5d

Browse files
committed
Enable file reading from command execution
1 parent 00378ee commit 0b6de5d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/core/src/shared/sagemaker/client/sagemaker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
// import * as vscode from 'vscode'
6+
import * as vscode from 'vscode'
77
import * as fs from 'fs'
88
import { fromContainerMetadata } from '@aws-sdk/credential-provider-imds'
99
import { Service } from 'aws-sdk'
@@ -93,8 +93,7 @@ export class SageMakerSpaceClient {
9393
public async getSageMakerCookies(forceUpdate = false): Promise<SageMakerCookie | undefined> {
9494
if (forceUpdate || this.cachedCookies == null) {
9595
try {
96-
// const cookiesFilePath = (await vscode.commands.executeCommand('sagemaker.loadCookies')) as string
97-
const cookiesFilePath = '/home/sagemaker-user/.aws/sso/cookies.json'
96+
const cookiesFilePath = (await vscode.commands.executeCommand('sagemaker.loadCookies')) as string
9897
if (cookiesFilePath) {
9998
this.cachedCookies = JSON.parse(
10099
fs.readFileSync(cookiesFilePath, { encoding: 'utf8' })

0 commit comments

Comments
 (0)