mirror of
				https://github.com/easingthemes/ssh-deploy.git
				synced 2025-10-30 23:30:09 +08:00 
			
		
		
		
	fix: add uuid for ssh scripts
This commit is contained in:
		
							parent
							
								
									d91ea7e0f7
								
							
						
					
					
						commit
						66f6e4b367
					
				| @ -1,4 +1,5 @@ | |||||||
| const { exec } = require('child_process'); | const { exec } = require('child_process'); | ||||||
|  | const crypto = require('crypto'); | ||||||
| const { sshServer, githubWorkspace, remotePort } = require('./inputs'); | const { sshServer, githubWorkspace, remotePort } = require('./inputs'); | ||||||
| const { writeToFile } = require('./helpers'); | const { writeToFile } = require('./helpers'); | ||||||
| 
 | 
 | ||||||
| @ -12,7 +13,8 @@ const handleError = (message, isRequired, callback) => { | |||||||
| 
 | 
 | ||||||
| // eslint-disable-next-line max-len
 | // eslint-disable-next-line max-len
 | ||||||
| const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Promise((resolve, reject) => { | const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Promise((resolve, reject) => { | ||||||
|   const filename = `local_ssh_script-${label}.sh`; |   const uuid = crypto.randomUUID(); | ||||||
|  |   const filename = `local_ssh_script-${label}-${uuid}.sh`; | ||||||
|   try { |   try { | ||||||
|     writeToFile({ dir: githubWorkspace, filename, content }); |     writeToFile({ dir: githubWorkspace, filename, content }); | ||||||
|     const dataLimit = 10000; |     const dataLimit = 10000; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Dragan Filipovic
						Dragan Filipovic