mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
refractor: use script syntax in execa
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user