Skip to content

Commit be55b49

Browse files
mtorpjdalton
andauthored
fix Cannot read properties of null error when calling output.toString() (#848)
Co-authored-by: John-David Dalton <jdalton@users.noreply.github.com>
1 parent 8edfe87 commit be55b49

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/cli/src/utils/dlx/spawn.mts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ export async function spawnCoanaDlx(
144144
data:
145145
typeof spawnResult.stdout === 'string'
146146
? spawnResult.stdout
147-
: spawnResult.stdout.toString(),
147+
: spawnResult.stdout
148+
? spawnResult.stdout.toString()
149+
: '',
148150
}
149151
}
150152

@@ -175,7 +177,9 @@ export async function spawnCoanaDlx(
175177
data:
176178
typeof output.stdout === 'string'
177179
? output.stdout
178-
: output.stdout.toString(),
180+
: output.stdout
181+
? output.stdout.toString()
182+
: '',
179183
}
180184
} catch (e) {
181185
const stderr = (e as any)?.stderr

0 commit comments

Comments
 (0)