@@ -2,7 +2,7 @@ import type { CliOptions, SpinnerOptions as Spinner } from '@stacksjs/types'
2
2
import { ExitCode } from '@stacksjs/types'
3
3
import { projectPath } from '@stacksjs/path'
4
4
import { determineDebugLevel } from '@stacksjs/utils'
5
- import { err , ok } from '@stacksjs/error-handling'
5
+ import { ok } from '@stacksjs/error-handling'
6
6
import { log } from '@stacksjs/logging'
7
7
import { spawn , spawnSync } from './command'
8
8
import { startSpinner } from './helpers'
@@ -29,14 +29,6 @@ export async function exec(command: string | string[], options?: CliOptions) {
29
29
cwd,
30
30
env : process . env ,
31
31
shell,
32
- // stdio: 'inherit',
33
- onExit ( subprocess , exitCode , signalCode , error ) {
34
- console . log ( 'subprocess' , subprocess )
35
- console . log ( 'exitCode' , exitCode )
36
- console . log ( 'signalCode' , signalCode )
37
- console . log ( 'error' , error )
38
- return err ( 'Failed to execute command' )
39
- } ,
40
32
} )
41
33
42
34
console . log ( 'proc' , proc )
@@ -92,10 +84,10 @@ export async function runCommands(commands: string[], options?: CliOptions) {
92
84
for ( const command of commands ) {
93
85
const result = await runCommand ( command , options )
94
86
95
- if ( result . isOk ( ) ) {
87
+ if ( result ? .isOk ( ) ) {
96
88
results . push ( result )
97
89
}
98
- else if ( result . isErr ( ) ) {
90
+ else if ( result ? .isErr ( ) ) {
99
91
log . error ( new Error ( `Failed to run command ${ italic ( command ) } ` ) )
100
92
101
93
process . exit ( ExitCode . FatalError )
0 commit comments