on master help sign in
Merge pull request #81 from replit/cb-nix-sqlite
f9bc171Connor Brewster
languages/sqlite/main.go+6−1
@@ -42,7 +42,12 @@ func preloadQuietLib(env []string) []string {
42 panic(err)
42 panic(err)
43 }
43 }
44 runDir := filepath.Dir(execPath)
44 runDir := filepath.Dir(execPath)
45+
46+ prybarAssetDir := os.Getenv("PRYBAR_ASSETS_DIR")
47+ if prybarAssetDir == "" {
45− libPath := filepath.Join(runDir, "prybar_assets", "sqlite", "patch.so")
48+ prybarAssetDir = filepath.Join(runDir, "prybar_assets")
49+ }
50+ libPath := filepath.Join(prybarAssetDir, "sqlite", "patch.so")
46 return append(env, []string{"LD_PRELOAD=" + libPath, "PRYBAR_QUIET=1"}...)
51 return append(env, []string{"LD_PRELOAD=" + libPath, "PRYBAR_QUIET=1"}...)
47}
52}
48
53