Browse Source

Fix vim permissions

master
Matthew Faltys 5 years ago
parent
commit
5941f65e51
  1. 4
      nethack-launcher.go

4
nethack-launcher.go

@ -202,12 +202,12 @@ func printUserScreen(redisClient *redis.Client, username string) string {
hackRCLoc := fmt.Sprintf("%s/user/%s/.nethackrc", config.NethackLauncher.HackDir, username) hackRCLoc := fmt.Sprintf("%s/user/%s/.nethackrc", config.NethackLauncher.HackDir, username)
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run()
clearScreen() clearScreen()
nh := exec.Command("vim", hackRCLoc) nh := exec.Command("vim", "-Z", hackRCLoc)
nh.Stdout = os.Stdout nh.Stdout = os.Stdout
nh.Stdin = os.Stdin nh.Stdin = os.Stdin
nh.Stderr = os.Stderr nh.Stderr = os.Stderr
nh.Run() nh.Run()
clearScree() clearScreen()
printUserScreen(redisClient, username) printUserScreen(redisClient, username)
case "w": case "w":
clearScreen() clearScreen()

Loading…
Cancel
Save