Skip to content

Commit

Permalink
Fix for SDK < 51
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman committed Mar 6, 2024
1 parent 87d3ee8 commit 7c1d66c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/eas-cli/src/utils/expoUpdatesCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ export async function expoUpdatesCommandAsync(projectDir: string, args: string[]
try {
return (await spawnAsync(expoUpdatesCli, args)).stdout;
} catch (e: any) {
if (e.stderr) {
if ((e.stderr as string).includes('Invalid command')) {
if (e.stderr && typeof e.stderr === 'string') {
if (
e.stderr.includes('Invalid command') || // SDK 51+
e.stderr.includes('commands[command] is not a function') // SDK <= 50
) {
throw new ExpoUpdatesCLIInvalidCommandError(
`The command specified by ${args} was not valid in the \`expo-updates\` CLI.`
);
Expand Down

0 comments on commit 7c1d66c

Please sign in to comment.