mirror of
https://github.com/beego/bee.git
synced 2025-06-13 06:40:39 +00:00
fix Beego issue 5719
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
// not use this file except in compliance with the License. You may obtain
|
||||
// a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
@ -300,6 +300,7 @@ func writeMigrationSourceFile(dir, source, driver, connStr string, latestTime in
|
||||
// buildMigrationBinary changes directory to database/migrations folder and go-build the source
|
||||
func buildMigrationBinary(dir, binary string) {
|
||||
changeDir(dir)
|
||||
_ = exec.Command("go", "mod", "tidy").Run()
|
||||
cmd := exec.Command("go", "build", "-o", binary)
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
beeLogger.Log.Errorf("Could not build migration binary: %s", err)
|
||||
|
Reference in New Issue
Block a user