summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-09-12 15:27:44 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-09-12 20:27:44 +0800
commit4c2b1be3a4bc0479927922f12b0c71b2404d073f (patch)
tree9d680c8ad29fb67a198a5069bcbd68340e63682d /modules
parent8c3a2e817be8a365abf167893e1d73ae79382cb6 (diff)
downloadgitea-4c2b1be3a4bc0479927922f12b0c71b2404d073f.tar.gz
gitea-4c2b1be3a4bc0479927922f12b0c71b2404d073f.zip
Basic VSCode configuration for building and debugging (#2483)
* Basic VSCode configuration for building and debugging * Fix building and debugging in Windows * Move to contrib folder and add instructions
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 721dd0f0f7..4932f51a68 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -500,7 +500,11 @@ func DateLang(lang string) string {
// execPath returns the executable path.
func execPath() (string, error) {
- file, err := exec.LookPath(os.Args[0])
+ execFile := os.Args[0]
+ if IsWindows && filepath.IsAbs(execFile) {
+ return filepath.Clean(execFile), nil
+ }
+ file, err := exec.LookPath(execFile)
if err != nil {
return "", err
}