on master help sign in
Merge pull request #81 from replit/cb-nix-sqlite

Fix wrong prybar asset dir for sqlite

commitf9bc1714794d4081febe2415537d07634dcd8ab9 authorConnor Brewster <cbrewster@hey.com> dateWed 17 Nov 2021, 13:07 (5 years ago) parent835586cf39c0e0
1 file changed+6−1
languages/sqlite/main.go+6−1
languages/sqlite/main.go+6−1
@@ -42,7 +42,12 @@ func preloadQuietLib(env []string) []string {
4242 panic(err)
4343 }
4444 runDir := filepath.Dir(execPath)
45− libPath := filepath.Join(runDir, "prybar_assets", "sqlite", "patch.so")
45+
46+ prybarAssetDir := os.Getenv("PRYBAR_ASSETS_DIR")
47+ if prybarAssetDir == "" {
48+ prybarAssetDir = filepath.Join(runDir, "prybar_assets")
49+ }
50+ libPath := filepath.Join(prybarAssetDir, "sqlite", "patch.so")
4651 return append(env, []string{"LD_PRELOAD=" + libPath, "PRYBAR_QUIET=1"}...)
4752}
4853