refractor: use script syntax in execa

This commit is contained in:
Aman Varshney
2025-02-13 11:34:49 +05:30
parent 46b798971e
commit d99e161e40
5 changed files with 25 additions and 36 deletions

View File

@@ -1,8 +1,8 @@
import { execa } from "execa";
import { $ } from "execa";
export async function isTursoInstalled() {
try {
await execa("turso", ["--version"]);
await $`turso --version`;
return true;
} catch {
return false;
@@ -11,7 +11,7 @@ export async function isTursoInstalled() {
export async function isTursoLoggedIn() {
try {
const output = await execa("turso", ["auth", "whoami"]);
const output = await $`turso auth whoami`;
return !output.stdout.includes("You are not logged in");
} catch {
return false;