We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b22e25 commit c8888d0Copy full SHA for c8888d0
commands/run.go
@@ -37,6 +37,11 @@ func Run() error {
37
if err != nil {
38
return cli.Error("Not in a CodeGame project directory")
39
}
40
+ wd, _ := os.Getwd()
41
+ rootRelative, err := filepath.Rel(wd, root)
42
+ if err != nil {
43
+ return err
44
+ }
45
46
data, err := cgfile.LoadCodeGameFile(root)
47
@@ -53,7 +58,7 @@ func Run() error {
53
58
switch data.Lang {
54
59
case "go":
55
60
cmdName = "go"
56
- args = append(args, "run")
61
+ args = append(args, []string{"run", filepath.Join(rootRelative, "main.go")}...)
57
62
default:
63
return cli.Error("'run' is not supported for '%s'", data.Lang)
64
0 commit comments