Skip to content

Commit 55cc95e

Browse files
committed
createPolicy update
1 parent 3302caf commit 55cc95e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/awsService/iot/commands/createPolicy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
*/
55

66
import * as vscode from 'vscode'
7-
import * as fs from 'fs-extra'
87
import { getLogger } from '../../../shared/logger'
98
import { localize } from '../../../shared/utilities/vsCodeUtils'
109
import { showViewLogsMessage } from '../../../shared/utilities/messages'
1110
import { IotPolicyFolderNode } from '../explorer/iotPolicyFolderNode'
11+
import { fs } from '../../../shared'
1212

1313
/**
1414
* Creates a policy from a policy document.
@@ -49,7 +49,7 @@ export async function createPolicyCommand(node: IotPolicyFolderNode, getPolicyDo
4949
await node.refreshNode()
5050
}
5151

52-
export async function getPolicyDocument(): Promise<Buffer | undefined> {
52+
export async function getPolicyDocument(): Promise<Uint8Array | undefined> {
5353
const fileLocation = await vscode.window.showOpenDialog({
5454
canSelectFolders: false,
5555
canSelectFiles: true,
@@ -64,7 +64,7 @@ export async function getPolicyDocument(): Promise<Buffer | undefined> {
6464

6565
const policyLocation = fileLocation[0]
6666

67-
let data: Buffer
67+
let data: Uint8Array
6868
try {
6969
data = await fs.readFile(policyLocation.fsPath)
7070
} catch (e) {

0 commit comments

Comments
 (0)