diff --git a/packages/jest-changed-files/src/sl.ts b/packages/jest-changed-files/src/sl.ts index 50ee99122757..4230e3485290 100644 --- a/packages/jest-changed-files/src/sl.ts +++ b/packages/jest-changed-files/src/sl.ts @@ -7,7 +7,6 @@ */ import * as path from 'path'; -import {types} from 'util'; import execa = require('execa'); import type {SCMAdapter} from './types'; @@ -34,19 +33,7 @@ const adapter: SCMAdapter = { } args.push(...includePaths); - let result: execa.ExecaReturnValue; - - try { - result = await execa('sl', args, {cwd, env}); - } catch (error) { - if (types.isNativeError(error)) { - const err = error as execa.ExecaError; - // TODO: Should we keep the original `message`? - err.message = err.stderr; - } - - throw error; - } + const result = await execa('sl', args, {cwd, env}); return result.stdout .split('\n')