mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 23:14:28 +01:00
cmd/ebitenmobile: Add hack to enable go-list at the temporary directory
This commit is contained in:
parent
732ad120c3
commit
78a1698069
@ -92,6 +92,19 @@ func prepareGomobileCommands() error {
|
|||||||
os.Chdir(pwd)
|
os.Chdir(pwd)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// Hack to enable go-list at the temporary directory.
|
||||||
|
f, err := os.Create("main.go")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
if _, err := f.WriteString("package main\n"); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := f.Sync(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err := runGo("mod", "init", "ebitenmobiletemporary"); err != nil {
|
if err := runGo("mod", "init", "ebitenmobiletemporary"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user