Fix issue on windows

This commit is contained in:
Unknown 2014-03-26 09:22:08 -04:00
parent 409e4cde7a
commit 7ab94fe816
6 changed files with 18 additions and 17 deletions

View file

@ -251,7 +251,8 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
}
defer pu.Close()
// TODO: Windows .bat
if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n", appPath)); err != nil {
if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n",
strings.Replace(appPath, "\\", "/", -1))); err != nil {
return err
}