diff --git a/src/helpers/helpers.ts b/src/helpers/helpers.ts index b0d489a..4094fa9 100644 --- a/src/helpers/helpers.ts +++ b/src/helpers/helpers.ts @@ -10,9 +10,8 @@ export const getCurrentPath = () => vscode.workspace.rootPath; export const getWorkspaceFilePath = () => vscode.workspace.workspaceFile; -// TODO: fix this function export const copyToClipboard = async (content = "") => - await require("child_process").spawn("clip").stdin.end(util.inspect(content)); + await vscode.env.clipboard.writeText(util.inspect(content)); const calculateBrowserStart = async () => { let start = "xdg-open";