Skip to content

Commit 16e3d48

Browse files
committed
fix: removed try/catch block to bail origin error
1 parent 4763b5d commit 16e3d48

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/bundle/bundle.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,12 @@ const bundleReactNative = async (config: BundlerConfig, shouldBuildSourceMaps?:
7878
}
7979

8080
const checkoutAndBuild = async (bundlerConfig: BundlerConfig, commit: string) => {
81-
try {
82-
await fetchOrigin()
83-
await checkout(commit)
84-
const output = await bundleReactNative(bundlerConfig, false)
81+
await fetchOrigin()
82+
await checkout(commit)
83+
const output = await bundleReactNative(bundlerConfig, false)
84+
await gitRestore()
8585

86-
return output
87-
} finally {
88-
await gitRestore()
89-
}
86+
return output
9087
}
9188

9289
const readBaseHashes = async (bundlerConfig: BundlerConfig, base: string): Promise<Hashes> => {

src/bundle/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { info } from './utils'
33

44
const git = simpleGit()
55

6-
export function fetchOrigin() {
7-
return git.fetch('origin')
6+
export async function fetchOrigin() {
7+
await git.fetch('origin')
88
}
99

1010
export async function checkout(commit: string) {

0 commit comments

Comments
 (0)