/{cmd,docs,internal}: support import export for dolt backends
This commit is contained in:
@@ -103,6 +103,7 @@ func (s *Server) Start(ctx context.Context) error {
|
||||
}
|
||||
|
||||
// Create command
|
||||
// #nosec G204 -- dolt binary is fixed; args are derived from internal config.
|
||||
s.cmd = exec.CommandContext(ctx, "dolt", args...)
|
||||
s.cmd.Dir = s.cfg.DataDir
|
||||
|
||||
@@ -272,6 +273,7 @@ func (s *Server) waitForReady(ctx context.Context) error {
|
||||
// GetRunningServerPID returns the PID of a running server from the PID file, or 0 if not running
|
||||
func GetRunningServerPID(dataDir string) int {
|
||||
pidFile := filepath.Join(dataDir, "dolt-server.pid")
|
||||
// #nosec G304 -- pidFile is derived from internal dataDir.
|
||||
data, err := os.ReadFile(pidFile)
|
||||
if err != nil {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user