mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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)
|
||||
}()
|
||||
|
||||
// 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 {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user