mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
cmd/gogio: fix a couple of staticcheck positives
Spotted the javac one by chance when reading the code, so I ran the tool and fixed another small bug while at it. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
@@ -151,6 +151,9 @@ func compileAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err erro
|
||||
return errors.New("ANDROID_HOME is not set. Please point it to the root of the Android SDK")
|
||||
}
|
||||
javac, err := findJavaC()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not find javac: %v", err)
|
||||
}
|
||||
ndkRoot := filepath.Join(androidHome, "ndk-bundle")
|
||||
if _, err := os.Stat(ndkRoot); err != nil {
|
||||
return fmt.Errorf("no NDK found in $ANDROID_HOME/ndk-bundle (%s). Use `sdkmanager ndk-bundle` to install it", ndkRoot)
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ type buildInfo struct {
|
||||
|
||||
func main() {
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(os.Stderr, mainUsage)
|
||||
fmt.Fprint(os.Stderr, mainUsage)
|
||||
}
|
||||
flag.Parse()
|
||||
if err := mainErr(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user