14
14
* limitations under the License.
15
15
*/
16
16
17
+ import chalk from "chalk"
17
18
import Debug from "debug"
18
19
import { MadWizardOptions } from "madwizard"
19
20
import { Arguments , Capabilities , ParsedOptions } from "@kui-shell/core"
@@ -61,8 +62,8 @@ export async function attach(
61
62
{
62
63
appName,
63
64
profile,
65
+ quiet : true ,
64
66
interactive : false ,
65
- verbose : true ,
66
67
} ,
67
68
opts
68
69
)
@@ -74,7 +75,7 @@ export async function attach(
74
75
try {
75
76
const deployOptions = Object . assign ( { } , options , { name : "log-aggregator-deploy" } )
76
77
debug ( "Deploying log aggregator" , deployGuidebook , deployOptions )
77
- stderr ( "Deploying log aggregator...\n" )
78
+ stderr ( chalk . yellow ( "Deploying log aggregator...\n" ) )
78
79
await guide ( [ appName , "guide" , deployGuidebook ] , undefined , deployOptions )
79
80
debug ( "deploying log aggregator: done" )
80
81
} catch ( err ) {
@@ -83,21 +84,21 @@ export async function attach(
83
84
}
84
85
85
86
debug ( "attaching to" , jobId )
86
- stderr ( "Attaching to job...\n" )
87
+ stderr ( chalk . yellow ( "Attaching to job...\n" ) )
87
88
const resp = await guide (
88
89
[ appName , "guide" , startGuidebook ] ,
89
90
undefined ,
90
91
Object . assign ( { } , options , { name : "log-aggregator-start" , clean : false } )
91
92
)
92
- stderr ( "Attaching to job done...\n" )
93
+ stderr ( chalk . yellow ( "Attaching to job done...\n" ) )
93
94
94
95
// the logdir that we captured
95
96
const logdir = resp && resp . env ? resp . env . LOGDIR_STAGE : undefined
96
97
if ( logdir ) {
97
98
debug ( "successfully attached to" , jobId , logdir )
98
- stderr ( "Successfully attached to job" )
99
+ stderr ( chalk . green ( "Successfully attached to job\n" ) )
99
100
} else {
100
- stderr ( "Error in attach to job (logdir not found)" )
101
+ stderr ( chalk . red ( "Error in attach to job (logdir not found)\n" ) )
101
102
}
102
103
103
104
return {
0 commit comments