Skip to content

Commit

Permalink
fix(cli): Global Expo CLI checks in Doctor command (#2618 by @Dax911)
Browse files Browse the repository at this point in the history
[skip ci]

* 👽 Depr Global Expo CLI tool

rm expo and added warning for depr

* 🗑️ Cleaned up expo

* ⚰️ Rm dead else statement

* 🚨 Ran linter

* 🔥 Rm bun file

file created when reinstalling bun didnt see it slip in

* ✨ Add warning

adds warning to doctor when dep cli tool is installed

* ♻️ Cleaned up code

case errors fixed

* ♻️ Oops one more

* 💄 Fix column

forgot to push
  • Loading branch information
Dax911 committed Feb 21, 2024
1 parent bb9e602 commit d0b2b2d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/commands/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,24 @@ module.exports = {
expoVersion = "-"
expoWorkflow = "not installed"
}

const expoInfo = [column1("expo"), column2(expoVersion), column3(expoWorkflow)]

let depExpoCliInfo = null

try {
const expoCliVersionOutput = await run("expo-cli --version", { trim: true })
if (expoCliVersionOutput) {
const expoCliVersion = expoCliVersionOutput.replace("v", "")
depExpoCliInfo = [
column1("expo global cli"),
column2(expoCliVersion),
column3(colors.yellow("Deprecated: Found 'expo-cli' installed. Please remove it.")),
]
}
} catch (_) {
// No action needed if 'expo-cli' is not installed or there's an error checking its version.
}

info("")
info(colors.cyan(`JavaScript${haveGlobalPackages ? " (and globally-installed packages)" : ""}`))
table([
Expand All @@ -110,6 +125,7 @@ module.exports = {
...pnpmPackages,
bunInfo,
expoInfo,
...(depExpoCliInfo ? [depExpoCliInfo] : []),
])

// -=-=-=- ignite -=-=-=-
Expand Down

0 comments on commit d0b2b2d

Please sign in to comment.