Skip to content

Commit 55ed603

Browse files
committed
chore: wip
1 parent 9311584 commit 55ed603

File tree

4 files changed

+208
-193
lines changed

4 files changed

+208
-193
lines changed

.stacks/core/actions/src/lint/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ export default async function lintAction() {
88
NpmScript.LintPackageJson,
99
], { cwd: projectPath(), verbose: true })
1010

11-
if (result.isErr())
12-
process.exit(ExitCode.FatalError)
11+
if (Array.isArray(result)) {
12+
if (result.map(r => r.isErr()).includes(true))
13+
process.exit(ExitCode.FatalError)
14+
}
1315

1416
process.exit(ExitCode.Success)
1517
}

.stacks/core/cli/src/run.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,11 @@ export async function runCommands(commands: string[], options?: CliOptions): Pro
7070
for (const command of commands) {
7171
const result = await runCommand(command, options)
7272

73-
// console.log('result', result)
74-
7573
if (result.isOk()) {
7674
results.push(result)
7775
}
7876
else if (result.isErr()) {
79-
if (spinner)
80-
log.error(new Error(`Failed to run command ${italic(command)}`))
77+
log.error(new Error(`Failed to run command ${italic(command)}`))
8178

8279
process.exit(ExitCode.FatalError)
8380

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env node
2+
3+
// import { spawn } from '@stacksjs/cli'
4+
5+
// const AWS = require('aws-sdk')
6+
7+
// const lambda = new AWS.Lambda()
8+
9+
// export async function handler(event, context) {
10+
// const child = await spawn('node', ['my-script.js'])
11+
//
12+
// if (child.error)
13+
// throw child.error
14+
//
15+
// return child.status
16+
// }

0 commit comments

Comments
 (0)