Skip to content

Commit 7ed5d79

Browse files
committed
bugs fixes
1 parent 7ae73b6 commit 7ed5d79

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

controllers/functions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func ProgramStarting(cnf *string, filepath string, modOrFile string, command str
3434
if *cnf == "cmd" {
3535

3636
} else if *cnf == "cnf" {
37-
cnfFunc(command, "", "")
37+
filepath, modOrFile = cnfFunc(command, "", "")
3838
} else if *cnf == "deploy" {
3939
deploy()
4040
} else if init == true {

controllers/pv.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"io/ioutil"
88
"os"
99
"os/exec"
10+
"time"
1011
)
1112

1213
func deploy() {
@@ -55,7 +56,7 @@ func initialize(name string, arch string, oso string) {
5556
os.Exit(1)
5657
}
5758

58-
func cnfFunc(command string, filepath string, modOrFile string) {
59+
func cnfFunc(command string, filepath string, modOrFile string) (string, string) {
5960
jsonFile, err := os.Open("godemon-cnf.json")
6061
ErrorHandle(err)
6162
defer jsonFile.Close()
@@ -71,6 +72,9 @@ func cnfFunc(command string, filepath string, modOrFile string) {
7172
modOrFile = commands.Commands[i].Option
7273
}
7374
}
75+
fmt.Println(filepath, modOrFile)
76+
time.Sleep(10 * time.Second)
77+
return filepath, modOrFile
7478
}
7579

7680
func killProcess() {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
}
2424
fmt.Println("File has been changed")
2525
if modOrFile == "mod" {
26-
os.Chdir(filepath)
26+
os.Chdir("/home/nwagner/Desktop/godemon/godemon_test/")
2727
controllers.TimeLog()
2828
cmd := exec.Command("go", "build", "-o", "app-godemon-app-godemon-tmp-generated")
2929
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)