5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-17 17:39:29 +08:00

correct issue with wails serve

This commit is contained in:
Travis McLane 2020-04-06 09:44:33 -05:00 committed by Lea Anthony
parent 75be8f698a
commit 3b034ceadb

View File

@ -132,8 +132,6 @@ func BuildDocker(binaryName string, buildMode string, projectOptions *ProjectOpt
user, _ := user.Current() user, _ := user.Current()
if i, err := strconv.Atoi(user.Uid); err == nil { if i, err := strconv.Atoi(user.Uid); err == nil {
userid = i userid = i
} else {
userid = 1000
} }
for _, arg := range []string{ for _, arg := range []string{
"docker", "docker",
@ -217,13 +215,12 @@ func BuildNative(binaryName string, forceRebuild bool, buildMode string, project
buildCommand := slicer.String() buildCommand := slicer.String()
buildCommand.Add("go") buildCommand.Add("go")
buildCommand.Add("build")
if buildMode == BuildModeBridge { if buildMode == BuildModeBridge {
// Ignore errors // Ignore errors
buildCommand.Add("-i") buildCommand.Add("-i")
} }
buildCommand.Add("build")
if binaryName != "" { if binaryName != "" {
// Alter binary name based on OS // Alter binary name based on OS
switch runtime.GOOS { switch runtime.GOOS {
@ -533,7 +530,7 @@ func ServeProject(projectOptions *ProjectOptions, logger *Logger) error {
time.Sleep(2 * time.Second) time.Sleep(2 * time.Second)
logger.Green(">>>>> To connect, you will need to run '" + projectOptions.FrontEnd.Serve + "' in the '" + projectOptions.FrontEnd.Dir + "' directory <<<<<") logger.Green(">>>>> To connect, you will need to run '" + projectOptions.FrontEnd.Serve + "' in the '" + projectOptions.FrontEnd.Dir + "' directory <<<<<")
}() }()
location, err := filepath.Abs(projectOptions.BinaryName) location, err := filepath.Abs(filepath.Join("build", projectOptions.BinaryName))
if err != nil { if err != nil {
return err return err
} }