fix: wrong pre command reference

This commit is contained in:
Madray Haven 2024-09-28 17:28:55 +08:00
parent e7e2e4786d
commit 7a48101015

View File

@ -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)
} }