Skip to content

Commit 71a1bef

Browse files
chore(internal): codegen related update (#55)
1 parent 25092c5 commit 71a1bef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/bootstrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
88
brew bundle check >/dev/null 2>&1 || {
99
echo "==> Installing Homebrew dependencies…"
1010
brew bundle

src/internal/parse.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export async function defaultParseResponse<T>(client: Gitpod, props: APIResponse
2626
}
2727

2828
const contentType = response.headers.get('content-type');
29-
const isJSON =
30-
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
29+
const mediaType = contentType?.split(';')[0]?.trim();
30+
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
3131
if (isJSON) {
3232
const json = await response.json();
3333
return json as T;

0 commit comments

Comments
 (0)