Skip to content

Commit 5facbae

Browse files
committed
fix: sna tasks fix
1 parent e8b14fc commit 5facbae

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

cli/action/sna.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ func (s *SnaAction) WithSnaGetAction(isSet bool) *SnaAction {
9393
func (s *SnaAction) DoSnaActions() (onError bool, message, hint string) {
9494
for _, task := range s.tasks {
9595
switch task {
96-
case SnaInfoAction:
97-
return InfoSna(s.Path)
9896
case SnaFormatAction:
99-
return FormatSna(s.Path, s.Version)
97+
onError, message, hint = FormatSna(s.Path, s.Version)
10098
case SnaHexaListAction:
10199
sna, err := sna.ReadSna(s.Path)
102100
if err != nil {
@@ -136,8 +134,13 @@ func (s *SnaAction) DoSnaActions() (onError bool, message, hint string) {
136134
s.Path,
137135
err), ""
138136
}
137+
case SnaInfoAction:
138+
onError, message, hint = InfoSna(s.Path)
139139
default:
140-
return InfoSna(s.Path)
140+
onError, message, hint = InfoSna(s.Path)
141+
}
142+
if onError {
143+
return onError, message, hint
141144
}
142145
}
143146
return false, "", ""

0 commit comments

Comments
 (0)