Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc9218c

Browse files
committed
capture error on command failure
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent2b3a672 commitfc9218c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎scripts/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ cd web-app
2828
yarn build
2929
cd ..
3030

31-
# For Windows build: switch the next 2 lines
3231
echo"Bundling webapp..."
3332
if [["$OSTYPE"=="msys" ]];then
3433
# linux subsystem on windows selected

‎src/services/hooks/utils/runCommands.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ const runCommands = async (commands: string[] = []): Promise<void> => {
1111
title:command,
1212
description:'Running process...',
1313
}
14+
logger(`Command:${command}`)
1415
send({type:'COMMAND_START',payload:{process:{ ...process,status:'RUNNING'}}})
1516
letresult:{stdout:string;stderr:string}
1617
try{
1718
result=awaitexec({ command})
18-
logger(`Command output:${JSON.stringify(result)}`)
19+
if(result.stderr){
20+
thrownewError(result.stderr)
21+
}
22+
logger(`Command output:${result.stdout}`)
1923
}catch(error:any){
2024
logger(`Command failed:${error.message}`)
2125
send({type:'',payload:{process:{ ...process,status:'FAIL'}}})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp