Skip to content

Commit

Permalink
Fix: Change Chdir to relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdulsametileri committed Apr 18, 2022
1 parent 843af24 commit 00ee972
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/vx/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package cli
import (
"log"
"os"
"path/filepath"
"runtime"
"time"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -33,8 +31,7 @@ func Execute() {
}

func changeWorkingDirectoryToRootDir() {
_, filename, _, _ := runtime.Caller(0)
err := os.Chdir(filepath.Join(filepath.Dir(filename), "..", "..", ".."))
err := os.Chdir("../../..")
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 00ee972

Please sign in to comment.