Merge pull request #117 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
commit 49fdf8213a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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