Browse Source

use absolute file path to prevent errors after chdir.

Lucas Stadler 11 years ago
parent
commit
71378a4ce5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      go/qst.go

+ 2 - 0
go/qst.go

@ -8,6 +8,7 @@ import (
8 8
	"os"
9 9
	"os/exec"
10 10
	"os/signal"
11
	"path/filepath"
11 12
	"strings"
12 13
	"syscall"
13 14
	"time"
@ -69,6 +70,7 @@ func main() {
69 70
		}
70 71
		cmd = projectCmd
71 72
	}
73
	file, _ = filepath.Abs(file)
72 74
	cmd = strings.Replace(cmd, "{file}", file, -1)
73 75
	if err := os.Chdir(fileutil.Dir(file)); err != nil {
74 76
		log.Fatal(err)