on master help sign in
Fix elisp prybar asset dir lookup when bundled with Nix
83fcd69Connor Brewster
languages/elisp/main.go+6−1
@@ -25,7 +25,12 @@ func Execute(config *utils.Config) {
25 }
25 }
26
26
27 runDir := filepath.Dir(execPath)
27 runDir := filepath.Dir(execPath)
28+
29+ prybarAssetDir := os.Getenv("PRYBAR_ASSETS_DIR")
30+ if prybarAssetDir == "" {
28− replPath := filepath.Join(runDir, "prybar_assets", "elisp", "repl.el")
31+ prybarAssetDir = filepath.Join(runDir, "prybar_assets")
32+ }
33+ replPath := filepath.Join(prybarAssetDir, "elisp", "repl.el")
29
34
30 args = append(
35 args = append(
31 args, "emacs", "-nw", "-Q", "--load", replPath,
36 args, "emacs", "-nw", "-Q", "--load", replPath,