Commit ca9dd56
committed
review(gitops): drop duplicate-return branches in redeploy error paths
The if/else after a non-nil error did `return result, err` in both
branches; only the side-effect (markSyncRedeployFailedInternal) was
gated on the AsType check. Flatten to do the gated side-effect and
return once.
For the directory-sync path: the source (redeployIfRunningAfterSync)
only ever returns nil or redeployAfterSyncFailedError, so the AsType
check is effectively guaranteed today but is left as a defensive
guard against future contract drift.
For the single-file path: the source (getOrCreateProjectInternal)
can return either the typed error or a plain failSync error, so the
AsType check is meaningful — but the duplicate return still wasn't.
Greptile review on getarcaneapp#2782.1 parent 3085942 commit ca9dd56
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
| 965 | + | |
| 966 | + | |
965 | 967 | | |
966 | 968 | | |
967 | | - | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
| |||
985 | 986 | | |
986 | 987 | | |
987 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
988 | 993 | | |
989 | 994 | | |
990 | 995 | | |
991 | | - | |
992 | 996 | | |
993 | 997 | | |
994 | 998 | | |
| |||
0 commit comments