File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ lib.makeScope pkgs.newScope (scripts: {
1919 protoc-gen-go-ttrpc
2020 nix-update
2121 scripts . go-directive-sync
22+ scripts . gofix
2223 ] ;
2324 text = ''
2425 echo "Syncing go directive versions in go.mod/go.work files" >&2
@@ -67,6 +68,8 @@ lib.makeScope pkgs.newScope (scripts: {
6768
6869 echo "Updating default kata-container configuration toml files" >&2
6970 nix run .#scripts.update-kata-configurations
71+
72+ gofix
7073 '' ;
7174 } ;
7275
@@ -105,9 +108,11 @@ lib.makeScope pkgs.newScope (scripts: {
105108 done < <(go list -f '{{.Dir}}' -m)
106109
107110 # TODO(katexochen): modernize does not support tags?
111+ # The run will fail for packages that contain only code with build tags,
112+ # thus we ignore the exit code.
108113 while IFS= read -r dir; do
109114 echo "Running modernize on $dir"
110- (cd "$dir" && modernize -fix ./...) || exitcode=$?
115+ (cd "$dir" && modernize -fix ./...) || true
111116 done < <(go list -f '{{.Dir}}' -m)
112117
113118 exit $exitcode
You can’t perform that action at this time.
0 commit comments