From d87a33a751cd26f3d5dccf6f0c9b3f02d90e5952 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Mon, 20 Feb 2023 22:26:02 -0800 Subject: [PATCH] bootdeploy: remove dependency on misc.Exists Checking for the app is unnecessary, since the cmd.Run later will fail if it doesn't exist. This allows dropping the dependency on misc.Exists. There's also no reason to print that the command failed, just return the error. --- internal/bootdeploy/bootdeploy.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/bootdeploy/bootdeploy.go b/internal/bootdeploy/bootdeploy.go index 0720aab..6613af7 100644 --- a/internal/bootdeploy/bootdeploy.go +++ b/internal/bootdeploy/bootdeploy.go @@ -8,8 +8,6 @@ import ( "os/exec" "path/filepath" "strings" - - "gitlab.com/postmarketOS/postmarketos-mkinitfs/internal/misc" ) type BootDeploy struct { @@ -87,14 +85,10 @@ func bootDeploy(workDir string, outDir string) error { "-d", workDir, "-o", outDir, "initramfs-extra") - if !misc.Exists(cmd.Path) { - return errors.New("boot-deploy command not found") - } cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { - log.Print("'boot-deploy' command failed") return err }