|  | @@ -22,7 +22,7 @@ with open(log_file, 'w') as f:
 | 
	
		
			
				|  |  |                               text=True)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      # 检查script1.sh的返回码,并写入输出到日志文件
 | 
	
		
			
				|  |  | -    if result1.returncode == 0:
 | 
	
		
			
				|  |  | +    if result1.returncode == 0 and not result1.stderr:
 | 
	
		
			
				|  |  |          print("script1.sh 执行成功")
 | 
	
		
			
				|  |  |          f.write(f"--- script1.sh 输出 ---\n{result1.stdout}\n")
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -30,7 +30,7 @@ with open(log_file, 'w') as f:
 | 
	
		
			
				|  |  |          result2 = subprocess.run([script2_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # 检查script2.sh的返回码,并写入输出到日志文件
 | 
	
		
			
				|  |  | -        if result2.returncode == 0:
 | 
	
		
			
				|  |  | +        if result2.returncode == 0 and not result2.stderr:
 | 
	
		
			
				|  |  |              print("script2.sh 执行成功")
 | 
	
		
			
				|  |  |              f.write(f"--- script2.sh 输出 ---\n{result2.stdout}\n")
 | 
	
		
			
				|  |  |          else:
 |