Merge pull request from sgpublic-forks/feat/pre_command

fix: wrong pre command reference
This commit is contained in:
usual2970
2024-09-29 08:30:04 +08:00
committed by GitHub

@@ -71,7 +71,7 @@ func (s *ssh) Deploy(ctx context.Context) error {
// 执行前置命令 // 执行前置命令
if access.PreCommand != "" { if access.PreCommand != "" {
err, stdout, stderr := s.sshExecCommand(client, access.Command) err, stdout, stderr := s.sshExecCommand(client, access.PreCommand)
if err != nil { if err != nil {
return fmt.Errorf("failed to run pre-command: %w, stdout: %s, stderr: %s", err, stdout, stderr) return fmt.Errorf("failed to run pre-command: %w, stdout: %s, stderr: %s", err, stdout, stderr)
} }