Skip to content

Commit bef64e6

Browse files
jayzhuangCQ Bot
authored andcommitted
[fx][set] Avoid nil pointer err on file not found
Before this fix, `fx set` would NPE if user passes in a `--fint-params-path` pointing to a non-existent file. With this fix it correctly errors out with `no such file or directory`. Change-Id: I4452c9fd0bf4d0f532eb8bd2340971809e6b0439 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1086372 Reviewed-by: Oliver Newman <[email protected]> Commit-Queue: Auto-Submit <[email protected]> Fuchsia-Auto-Submit: Jay Zhuang <[email protected]>
1 parent c657e71 commit bef64e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/build/fx-set/cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ func mainImpl(ctx context.Context) error {
126126
path = filepath.Join(args.checkoutDir, path)
127127
}
128128
staticSpec, err = fint.ReadStatic(path)
129-
staticSpec.GnArgs = append(staticSpec.GnArgs, args.gnArgs...)
130129
if err != nil {
131130
return err
132131
}
132+
staticSpec.GnArgs = append(staticSpec.GnArgs, args.gnArgs...)
133133
}
134134

135135
contextSpec := &fintpb.Context{

0 commit comments

Comments
 (0)