Skip to content

Commit

Permalink
feat: use new Deno.Command API
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Dec 3, 2022
1 parent 5a88cfa commit 85ec271
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extensions/color_support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ export async function getColorSupport({
await request("run");

if (forcePermissions || await permissionState("run") === "granted") {
const child = await Deno.spawnChild("tput", {
const command = new Deno.Command("tput", {
args: ["colors"],
});

const child = command.spawn();

const { stdout } = await child.output();
if (stdout) {
const tputColors = +(new TextDecoder().decode(stdout) || 0);
Expand Down

0 comments on commit 85ec271

Please sign in to comment.