Skip to content

Commit 58e8c8f

Browse files
committed
pkg/aflow/action/kernel/build: fix a typo
While we are at it, let's also make it a constant to make the intent clearer.
1 parent 09a243e commit 58e8c8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/aflow/action/kernel/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func buildKernel(ctx *aflow.Context, args buildArgs) (buildResult, error) {
4444
image := filepath.FromSlash(build.LinuxKernelImage(targets.AMD64))
4545
makeArgs := build.LinuxMakeArgs(target, targets.DefaultLLVMCompiler, targets.DefaultLLVMLinker,
4646
"ccache", dir, runtime.NumCPU())
47-
compileCommnads := "compile_commands.json"
48-
makeArgs = append(makeArgs, path.Base(image), "-s", compileCommnads)
47+
const compileCommands = "compile_commands.json"
48+
makeArgs = append(makeArgs, path.Base(image), "-s", compileCommands)
4949
if out, err := osutil.RunCmd(time.Hour, args.KernelSrc, "make", makeArgs...); err != nil {
5050
return aflow.FlowError(fmt.Errorf("make failed: %w\n%s", err, out))
5151
}
@@ -55,7 +55,7 @@ func buildKernel(ctx *aflow.Context, args buildArgs) (buildResult, error) {
5555
keepFiles := map[string]bool{
5656
filepath.Join(dir, image): true,
5757
filepath.Join(dir, target.KernelObject): true,
58-
filepath.Join(dir, compileCommnads): true,
58+
filepath.Join(dir, compileCommands): true,
5959
}
6060
return filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
6161
if err != nil || d.IsDir() || keepFiles[path] || keepExt[filepath.Ext(d.Name())] {

0 commit comments

Comments
 (0)