mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Remove @ts-expect-error suppressions
This commit is contained in:
parent
932ea6b8f9
commit
14c4c4997e
20 changed files with 62 additions and 79 deletions
|
|
@ -67,8 +67,6 @@ function resolveCommandPath(command) {
|
|||
// Use 'command -v' to find the full path
|
||||
const fullPath = execSync(`command -v ${command}`, {
|
||||
encoding: "utf8",
|
||||
// @ts-expect-error shell is a string option
|
||||
shell: true,
|
||||
}).trim();
|
||||
|
||||
if (!fullPath) {
|
||||
|
|
@ -120,8 +118,12 @@ export async function safeSpawn(command, args, options = {}) {
|
|||
});
|
||||
|
||||
child.on("close", (code) => {
|
||||
// Code is null if it terminated by a signal. This should never
|
||||
// happen in our code. If this happens, return 1 error code.
|
||||
|
||||
code = code ?? 1;
|
||||
|
||||
resolve({
|
||||
// @ts-expect-error code can be null
|
||||
status: code,
|
||||
stdout: stdout,
|
||||
stderr: stderr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue