Skip to content
Snippets Groups Projects
Commit b407a0c7 authored by Silvan's avatar Silvan
Browse files

bug fix

parent c39dcc60
No related branches found
No related tags found
No related merge requests found
...@@ -41,10 +41,12 @@ func main() { ...@@ -41,10 +41,12 @@ func main() {
go func() { go func() {
sig := <-signalChan sig := <-signalChan
fmt.Println("\nreceive signal:", sig) fmt.Println("\nreceive signal:", sig)
fmt.Println("restoreHosts ing...") if *config.Mode == 1 {
err := host.RestoreHosts() fmt.Println("restoreHosts...")
if err != nil { err := host.RestoreHosts()
fmt.Println("restoreHosts error:", err) if err != nil {
fmt.Println("restoreHosts error:", err)
}
} }
exit <- true exit <- true
}() }()
......
...@@ -15,7 +15,7 @@ buildGo() { ...@@ -15,7 +15,7 @@ buildGo() {
fi fi
echo "Building($GOOS/$GOARCH)..." echo "Building($GOOS/$GOARCH)..."
TargetDir=bin/$GOOS/$GOARCH TargetDir=bin/$GOOS/$GOARCH
env GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-X '$Path.Version=$CurrentVersion' -X '$Path.BuildTime=$BuildTime' -X '$Path.GoVersion=$GoVersion' -X '$Path.GitCommit=$GitCommit' -w -s" -o $TargetDir/$output_name env GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=0 go build -ldflags "-X '$Path.Version=$CurrentVersion' -X '$Path.BuildTime=$BuildTime' -X '$Path.GoVersion=$GoVersion' -X '$Path.GitCommit=$GitCommit' -w -s" -o $TargetDir/$output_name
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'An error has occurred! Aborting the script execution...' echo 'An error has occurred! Aborting the script execution...'
exit 1 exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment