File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,10 @@ export const prepare = async (
30
30
logger . log ( "Writing new version %s to `%s`" , version , fullCabalPath ) ;
31
31
32
32
logger . log ( "Running cabal sdist command" ) ;
33
- const { error , output } = await runExecCommand ( "cabal sdist" ) ;
33
+ const { warn , output } = await runExecCommand ( "cabal sdist" ) ;
34
34
35
- if ( error ) {
36
- logger . error ( error ) ;
37
- throw new Error ( error ) ;
35
+ if ( warn ) {
36
+ logger . warn ( warn ) ;
38
37
}
39
38
40
39
logger . log ( output ) ;
Original file line number Diff line number Diff line change @@ -72,11 +72,10 @@ export const publish = async (
72
72
logger . log ( "Checking publishDocumentation plugin configuration: " , publishDocumentation ) ;
73
73
if ( publishDocumentation ) {
74
74
logger . log ( "Generating documentation" ) ;
75
- const { error , output } = await runExecCommand ( V2_HADDOCK_COMMAND ) ;
75
+ const { warn , output } = await runExecCommand ( V2_HADDOCK_COMMAND ) ;
76
76
77
- if ( error ) {
78
- logger . error ( error ) ;
79
- throw new Error ( error ) ;
77
+ if ( warn ) {
78
+ logger . warn ( warn ) ;
80
79
}
81
80
logger . log ( output ) ;
82
81
logger . log ( "Publishing documentation" ) ;
Original file line number Diff line number Diff line change 1
1
import { exec } from "child_process" ;
2
2
3
- export const runExecCommand = ( command : string ) : Promise < { error : string ; output : string ; } > => {
3
+ interface OutputExec {
4
+ output : string ;
5
+ warn ?: string ;
6
+ }
7
+
8
+ export const runExecCommand = ( command : string ) : Promise < OutputExec > => {
4
9
return new Promise ( ( resolve , reject ) => {
5
10
exec ( command , ( error , stdout , stderr ) => {
6
- error !== null ? reject ( error ) : resolve ( { error : stderr , output : stdout } ) ;
11
+ error !== null ? reject ( error ) : resolve ( { output : stdout , warn : stderr } ) ;
7
12
} ) ;
8
13
} ) ;
9
14
} ;
You can’t perform that action at this time.
0 commit comments